Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp894950rwb; Wed, 7 Dec 2022 06:21:04 -0800 (PST) X-Google-Smtp-Source: AA0mqf5+7/Y/f4VLRTMRvAZwsiVMZQM2tZeMHMM6pTwd3KaA0W5oUiXXSeyALxB7NaLu0Cslg51E X-Received: by 2002:a17:906:b241:b0:7bc:1f2c:41b5 with SMTP id ce1-20020a170906b24100b007bc1f2c41b5mr47472821ejb.463.1670422863899; Wed, 07 Dec 2022 06:21:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670422863; cv=none; d=google.com; s=arc-20160816; b=rc6a300Qhldkh3nw1sCHw/Lt6FmRQMu6ITTgX/IhSRXEMNGNPGznSlod12hBm2tObc 9grQa/2PzeR/r1p9MHyPi7EsZFHqjzEmD0CY99d18XurtEJv2iVuczsDG1gsSdHxrmEM h7ek5uLdZPnXdRhqIo7zsbOFYQ3PeVtR3pY7sea5oSXvqn5AlfrsXGFohvPPlY9iX7wm 2NcgcGe8yzofnWvxkmmIi5a1yadwtX8GsI2SBIPpCb8UIQe4MIxvjKUI8glP+7whgKh5 0zANpb1XqY3KbGeuWtAGsSUnoNIheqLoUg/XD8QYKg3Oc2pMy238V/tOWSJRAcdNYimv fu6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=MFKNh80dzIIpEyweaTCY011xl4hhNd3bRFmb/w3ouyc=; b=T01NdGT4z6LppT+iCR5Ha/43F8a6XnQ4ISWwk2BIVF8/sCxDdbAF1kxRU/3pAAwvs2 eLBwYnRj1X+EEL/RfwqkPpIsXF7WqUGOOQvOHbBBDhM8BtWT0IGr0Iso+GwSx9xIPWbJ cKdRklSa0gwQ9yMRIoF1q8KRrLr1oarPhBuzWOhD5j1UkKwks0bDLMLU9Mok5i4pGlDB zDCtcazSEAh0FXuozhMhNGH/c465dvjSdse0IbOSrHTQlyuI/wIyf2MPE483LdiPG8zK aVV8r7aGbaDNDToA9PITBK7ElmI5CY7BgRzPHUtKgCkCZB/znsv+FuE0ZEm2n5lCDydg yZiw== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m7-20020a056402430700b00462f4ea167esi1343305edc.315.2022.12.07.06.20.43; Wed, 07 Dec 2022 06:21:03 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230152AbiLGNwL (ORCPT + 75 others); Wed, 7 Dec 2022 08:52:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229746AbiLGNwJ (ORCPT ); Wed, 7 Dec 2022 08:52:09 -0500 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB7E55B580; Wed, 7 Dec 2022 05:52:08 -0800 (PST) Received: by verein.lst.de (Postfix, from userid 2407) id E599267373; Wed, 7 Dec 2022 14:52:03 +0100 (CET) Date: Wed, 7 Dec 2022 14:52:03 +0100 From: Christoph Hellwig To: Jason Gunthorpe Cc: Christoph Hellwig , 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 Subject: Re: [RFC PATCH 1/5] nvme-pci: add function nvme_submit_vf_cmd to issue admin commands for VF driver. Message-ID: <20221207135203.GA22803@lst.de> References: <20221206061940.GA6595@lst.de> <20221206135810.GA27689@lst.de> <20221206153811.GB2266@lst.de> <20221206165503.GA8677@lst.de> <20221207075415.GB2283@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham 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 Wed, Dec 07, 2022 at 09:34:14AM -0400, Jason Gunthorpe wrote: > The VFIO design assumes that the "vfio migration driver" will talk to > both functions under the hood, and I don't see a fundamental problem > with this beyond it being awkward with the driver core. And while that is a fine concept per see, the current incarnation of that is fundamentally broken is it centered around the controlled VM. Which really can't work. > Even the basic assumption that there would be a controlling/controlled > relationship is not universally true. The mdev type drivers, and > SIOV-like devices are unlikely to have that. Once you can use PASID > the reasons to split things at the HW level go away, and a VF could > certainly self-migrate. Even then you need a controlling and a controlled entity. The controlling entity even in SIOV remains a PCIe function. The controlled entity might just be a bunch of hardware resoures and a PASID. Making it important again that all migration is driven by the controlling entity. Also the whole concept that only VFIO can do live migration is a little bogus. With checkpoint and restart it absolutely does make sense to live migrate a container, and with that the hardware interface (e.g. nvme controller) assigned to it. > So, when you see both Intel and Pensando proposing this kind of > layered model for NVMe where migration is subsystem-local to VFIO, I > think this is where the inspiration is coming from. Their native DPU > drivers already work this way. Maybe they should have talked to someone not high on their own supply before designing this.