Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5348458rwb; Sun, 11 Dec 2022 04:42:54 -0800 (PST) X-Google-Smtp-Source: AA0mqf46CWnTm7SMVsL4DbXBlp6JZ5xqlyHmp5wQTYy2o/Zjy2FP5roTvGY4uIPMGXF32EQ7HIXI X-Received: by 2002:a05:6a20:3ca5:b0:9d:efbf:8155 with SMTP id b37-20020a056a203ca500b0009defbf8155mr20961619pzj.30.1670762574371; Sun, 11 Dec 2022 04:42:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1670762574; cv=pass; d=google.com; s=arc-20160816; b=ungos4v6IbmW0EfKtiUE4PFDG/O76b5aVnHVkD3Lo+bAqpwkjVCbI/FF73/N0ets+s qneffEBpFbUkh+CUSCjLi5w+5ZPbQblWGq3WuNVjKy9gDRf4YWsAO67cCgS1IOrLvS+K Qq6EZ5C/xogQ7WmwZ/1GqeSoBpL7QHohA1X8BUBl5l9GIy6f1BwWqaACzP1aGH9JzWMy VmvnZ/+0WfUK/OHdeywilApgBsJ7FbrrdmK0iVURLf2Aip33P9QT8pyCUGW4NO3Ax4AB dAJQGn+FdD7S8LwuEg9D0gOr+pnrASQN3nYcciQA91bFsnFkZ2CZeyQK1zyrzcCiPO2r 2CVQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=kv7g7sf9afLZlqc+/la3k4fLfmuOGUWpKkUl+1WJECU=; b=dG1qQa8PcVS4Hrfr+dC5H0YWPEdq/YZkAZyA1tPrvtoit3QP6i/XMw2K4olPPVQH8W w5MjWb/jaJ0aMcWpCzK3nMwhkgmquz4p2Ni/sYm1mPla8cpttHfx0i845Wjsa2HJlYmQ H2bQ0hlSDT5vXz/DKgT5qexdoL642T0s2x5DsqTszW/tPwKChdL9jhLrP+VCl3KX36oE cUVTWKwN1I2sHZcm+CvRv+rFxrQzmQU6lA1VdguPcl3dYLMtiiCCtkr+inS5wSlD+eUj nvsw0GblRBPM6VlsKCWslRnwHGEY9wjuuFd+q92p33bKveVtfasVlg+21Ny8TwVr8rlF bNiQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b="i/AZbFzL"; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s15-20020a63770f000000b00478ebd3d4d1si6917911pgc.763.2022.12.11.04.42.44; Sun, 11 Dec 2022 04:42:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b="i/AZbFzL"; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230169AbiLKMFU (ORCPT + 75 others); Sun, 11 Dec 2022 07:05:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229891AbiLKMFS (ORCPT ); Sun, 11 Dec 2022 07:05:18 -0500 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2071.outbound.protection.outlook.com [40.107.101.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5048CC47; Sun, 11 Dec 2022 04:05:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lQNVBuH086EX96WXWRd1jBtfVXHN9Dxt8pwOfOeB++j3dY/tkBIJYorPYxZRhtAhMi89OjoFaZtPE1QRvPrtcLgNG01zt5Le8eZ43eupsV53ddyeNIvAGabLuDZ3IdO2nTx/3HoxdTi0r7eeeym3sCemGIpgQfIRdc2N/EpgBI0Qp1WhcXoaMdwYmZr88MtX6uicm6OeLOSVycrIPtPOBXtStZKVGijFKwXtmjjVUMW64d2A8IsyFgN2dV6w6ZPWwuX+k1KGrSs8gCFf+hFV7zyKENgZ7zrpt5ekVJUaW5NWPaklGZVYDgZ1bpFt2nAYxY5NxnJAY8yy2V8u8QWJVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kv7g7sf9afLZlqc+/la3k4fLfmuOGUWpKkUl+1WJECU=; b=PuaiO8NNU0HlptHGIQpxzQa1s37WOaprehmmDOg3JovLsWk9Eb5LKir2OZ5ihTdpZpSblJaIRm/ShQtam6JZY3aSERaSChpOkHcU/GXuRophSFt+QTBPeF6X+id4XJ31m1Fw5AZ4alyoIo0MDu+Y7/fcaPX407XfNlFTeWklBQGm2sbRezzwZrWoS7cgp1wfI1pF44k6vUshfidxLVnHHoEndvZ7lB0R28YJjDAmipv+rmCMdFLm9++9XMmzyj9tNLObkRYI9J8jBLrqA1LsptnPsS1LNL+zhRYu4baIpJbJImf+sBRooMRQOgc9V37JAK02z6KVNYWbt/TS7Zpggg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kv7g7sf9afLZlqc+/la3k4fLfmuOGUWpKkUl+1WJECU=; b=i/AZbFzL2c8DQLuW6S5Yc5MzvPe8yNvOeq3xjA4yb0VA94tAqDMt4LpIDoABkEhyJkonnEFySq/MmD0rp16U8N4Rlg2TPdDOuocV+PCaGolq+A2HwFwW+fMM3ZK7z/9eopqBj/spy2W7cuMyE4HlZKf+MRd+PcaVgYBnv+BQKByMDWg9+MlywZw5GJTmCFhLzQsSdxyUSUUZRjTS0Ki9HBKXPcaN8nH12Ap0+vetr3PPQ+QX/oTEP1vp2A8pvjG+fJx1YeGsWK8Ut2eADIsMti/WbDg3DnFVoodQN8Jc6M0MivgsK4GrgQOxgsBtDvBA8khOEqGTlDqOTSvuQNC0sA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from DM4PR12MB5040.namprd12.prod.outlook.com (2603:10b6:5:38b::19) by CH2PR12MB4102.namprd12.prod.outlook.com (2603:10b6:610:a9::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.19; Sun, 11 Dec 2022 12:05:15 +0000 Received: from DM4PR12MB5040.namprd12.prod.outlook.com ([fe80::3fb9:3266:7937:44fc]) by DM4PR12MB5040.namprd12.prod.outlook.com ([fe80::3fb9:3266:7937:44fc%8]) with mapi id 15.20.5880.019; Sun, 11 Dec 2022 12:05:15 +0000 Message-ID: <9bc8e614-a687-e419-f9fd-e3177cfb41dd@nvidia.com> Date: Sun, 11 Dec 2022 14:05:04 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [RFC PATCH 5/5] nvme-vfio: Add a document for the NVMe device Content-Language: en-US To: Christoph Hellwig , Jason Gunthorpe Cc: Lei Rao , kbusch@kernel.org, axboe@fb.com, kch@nvidia.com, sagi@grimberg.me, alex.williamson@redhat.com, cohuck@redhat.com, yishaih@nvidia.com, shameerali.kolothum.thodi@huawei.com, kevin.tian@intel.com, mjrosato@linux.ibm.com, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, kvm@vger.kernel.org, eddie.dong@intel.com, yadong.li@intel.com, yi.l.liu@intel.com, Konrad.wilk@oracle.com, stephen@eideticom.com, hang.yuan@intel.com, Oren Duer References: <20221206055816.292304-1-lei.rao@intel.com> <20221206055816.292304-6-lei.rao@intel.com> <20221206062604.GB6595@lst.de> <20221206130901.GB24358@lst.de> <20221206140002.GB27689@lst.de> <20221206143126.GB30297@lst.de> <20221206150131.GA32365@lst.de> From: Max Gurtovoy In-Reply-To: <20221206150131.GA32365@lst.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0214.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:33a::9) To DM4PR12MB5040.namprd12.prod.outlook.com (2603:10b6:5:38b::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR12MB5040:EE_|CH2PR12MB4102:EE_ X-MS-Office365-Filtering-Correlation-Id: 4c026b45-515e-4763-5689-08dadb6ff65c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Kv1AYbNoKSIHbUT1IlUmfUGUzkLOvOX4k59y4Pg1x5T8THrKwzE8dUTPk4mtYff2WwhdiZXezK7Uxsdwl+2SNFYtXAoXS+KCe9JYP3PQgW9kRxx+SC6iqiUxDsi/iBS1OhZisNt2t3PWxuCnKqTiwd5/kw2AUhxcNYjnWrEWD505c+iwvOEYiWP1rLr79ubV0ILD4HycTmAT0S4Hhtic2Dwu3fnvrXruXAy58XBPlrHszKYwk8T/s4wcJ+l5j++cJBDfqW18i58jZ5p5EjAbxSJc0XG1V01KhNGmmc21VIcuglyOTJcGdm3MpYa9QY2Ja3fKIYp6SjSB+nV0WQ3i5ov6lPdLScsRVgAMsa4gW6GBgcB8I08kr0aYOMYthP1hiUfsKgOpiRXdW62a2VVlEb4lzK0LNpXgQ71hrQXVOpk9ARi81qgnZ6+KqZAPxOamAv4iGtf+HR16W4jVKlbMEG9bZuaeCSl0esaM1NaOlmuKZXVl8SRh22ouYd53Js7IhQjSTvCVlaGfG3zIqAmhnIUuxWPm3wSD31EqwXi7an4RjOOr4HoY8z+u2pLl1zn4A4sAtkR9MLKA/wN2aciWUv7mD+e/Ul5ivvSCUIFvPsTWX2UndCBV1RXrxtlIBs4/Jx8nYc5FU8EW5de35eagafKCDPUPza0MaSGvhVX/fCV32FK7wUT5mXUqkDJSYJibHTL3l2/xWuXRSHasL0yaD8cdlKLgSGGPuLuUhB34rTo= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR12MB5040.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(136003)(346002)(366004)(376002)(396003)(39860400002)(451199015)(41300700001)(26005)(31696002)(86362001)(8936002)(36756003)(7416002)(5660300002)(6512007)(6486002)(478600001)(66946007)(6506007)(66556008)(8676002)(4326008)(53546011)(66476007)(6666004)(316002)(110136005)(54906003)(107886003)(31686004)(83380400001)(38100700002)(2616005)(186003)(2906002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YWFlMGR4dlNHbTdjYytQVEJob3ZQakFuREV0YUxieXI1dUt0MW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C9aWmt0UEplSFhicGdzQUoxWkJYdzl1ZVdyalpHQWI3OEJZ?= =?utf-8?B?TmR0WEJRUnN6Mm0wYVBSYWx4bjN4OU5wUlBTZkp4eC9wWG50UDR5R0xxc2dp?= =?utf-8?B?S1lmTFV6T1hweUNYQUF6Ui9vQXZGVlgxcjFwVDB6N1RoOS9QUEZ2dGg3b1hu?= =?utf-8?B?R0VOc3cwcmh3K0ZwNFpOalozekpSUm1kMEo4VkEyTEg5MkN2NHFqcWJjMmhF?= =?utf-8?B?bmhRZGdZVWp0bHQ5NVRidG53QldIeHFwT1NYcGE5THhXaU1CY0dEdkI5QWNk?= =?utf-8?B?TWQyWkN5MVBNQmkxWVNjQU5SWnRsOUNWeXoxUWVrZUtINitMT2FZMFN4eTlu?= =?utf-8?B?N1E9PQ==?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4c026b45-515e-4763-5689-08dadb6ff65c X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5040.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Dec 2022 12:05:15.0414 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: nyh3NmwxsaiMnEUKCyuve930lsT+m6LLaan1ylUupdQ9VRvR2qGzW6oME+qkstLHzmOUnehst9P6S1TEqUdsrA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4102 X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/6/2022 5:01 PM, Christoph Hellwig wrote: > On Tue, Dec 06, 2022 at 10:48:22AM -0400, Jason Gunthorpe wrote: >> Sadly in Linux we don't have a SRIOV VF lifecycle model that is any >> use. > Beward: The secondary function might as well be a physical function > as well. In fact one of the major customers for "smart" multifunction > nvme devices prefers multi-PF devices over SR-IOV VFs. (and all the > symmetric dual ported devices are multi-PF as well). > > So this isn't really about a VF live cycle, but how to manage life > migration, especially on the receive / restore side. And restoring > the entire controller state is extremely invasive and can't be done > on a controller that is in any classic form live. In fact a lot > of the state is subsystem-wide, so without some kind of virtualization > of the subsystem it is impossible to actually restore the state. ohh, great ! I read this subsystem virtualization proposal of yours after I sent my proposal for subsystem virtualization in patch 1/5 thread. I guess this means that this is the right way to go. Lets continue brainstorming this idea. I think this can be the way to migrate NVMe controllers in a standard way. > > To cycle back to the hardware that is posted here, I'm really confused > how it actually has any chance to work and no one has even tried > to explain how it is supposed to work. I guess in vendor specific implementation you can assume some things that we are discussing now for making it as a standard.