Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7733366rwb; Tue, 6 Dec 2022 09:10:48 -0800 (PST) X-Google-Smtp-Source: AA0mqf7BjVMHJPbK615AW82tR3xxUyvpr+00zaPBr3yWvGqkGuHpOYXwnZvubxXt+qPIclvVjQUV X-Received: by 2002:a17:907:a50a:b0:7c0:7902:885f with SMTP id vr10-20020a170907a50a00b007c07902885fmr15122301ejc.233.1670346647872; Tue, 06 Dec 2022 09:10:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670346647; cv=none; d=google.com; s=arc-20160816; b=fUQypfr1wMQ2XjKRfdw33RR0tbrSPxRDc3rgx89qIhgG1TVCZXH1XzFeiGKVSJ+JeV bsNoaYC/zQxB3nbJC9krSHj85cTRsjYCLZX9By5S365RSqN51G7eh80/mUKudVu/Nf9O KCCKCkfK0jW/m9pOj8yzKciA/DSOlE0HQk5fHH4TBbZj1r8EEhWwi1avIG3DkxFl+9D9 H9SL9hFGgzpYFRbnDNpb2qobXAGHSgO71UJ8zNWSt9Jd8PcQJ4N5ESLDyZraLSyOJyGU hf9xnkPsjepNYk9YBYUls9x9OCYEcD08jtbbsoIJq3Bp5VLUmuRCo/XjaTy37e5kyouw TXDg== 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=W2Wu/VqSKp43h5x2rSzuMUJjgQaWCLtIuyJyNNcr5pk=; b=VkslCpElN/XINYbs6cKtXLju+iy2nGKOT+Nj/637I11HgFic5/TQOoNdrkKtYl4nlU b4pyo3jjHy6mxtrRRNQboTmsTTFF6Qtn+tZ+ERwfFB9ZjJceGLD4UB5d1taGVnfYvtGk gASro/ADlilyLnlO6zmdR2CRayOSq+ilKmaqcYggLvvPyvMe0sdFk0EmwQhJelIh6TJY Tshi26da+yWYbhZwMtdprAhp0oamuM67Ho/ylPTbPfo8hE914ELie6at3203NGNcjV95 qsKWN7u21awnwKZYRUhKJhH1OvnU8O8Avswm8O0WavkTHVImDI04NL5HijAH74JNc+hj gsWA== 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 di7-20020a170906730700b007ad8bd5b636si15948964ejc.377.2022.12.06.09.10.29; Tue, 06 Dec 2022 09:10:47 -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 S235498AbiLFQzM (ORCPT + 77 others); Tue, 6 Dec 2022 11:55:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231990AbiLFQzK (ORCPT ); Tue, 6 Dec 2022 11:55:10 -0500 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B9991FCC5; Tue, 6 Dec 2022 08:55:09 -0800 (PST) Received: by verein.lst.de (Postfix, from userid 2407) id B56DF68B05; Tue, 6 Dec 2022 17:55:03 +0100 (CET) Date: Tue, 6 Dec 2022 17:55: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: <20221206165503.GA8677@lst.de> References: <20221206055816.292304-1-lei.rao@intel.com> <20221206055816.292304-2-lei.rao@intel.com> <20221206061940.GA6595@lst.de> <20221206135810.GA27689@lst.de> <20221206153811.GB2266@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 Tue, Dec 06, 2022 at 11:51:23AM -0400, Jason Gunthorpe wrote: > That is a big deviation from where VFIO is right now, the controlled > function is the one with the VFIO driver, it should be the one that > drives the migration uAPI components. Well, that is one way to see it, but I think the more natural way to deal with it is to drive everyting from the controlling function, because that is by definition much more in control. More importantly any sane design will have easy ways to list and manipulate all the controlled functions from the controlling functions, while getting from the controlled function to the controlling one is extremely awkward, as anything that can be used for that is by definition and information leak. It seems mlx5 just gets away with that by saying controlled functions are always VFs, and the controlling function is a PF, but that will break down very easily, especially once you want to nest the controlling scheme (and yes, I'm not making this up, as the nesting scheme is being proposed for nvme privately).