Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp446935rwb; Wed, 7 Dec 2022 00:09:50 -0800 (PST) X-Google-Smtp-Source: AA0mqf43+PJ31QFowi1E5VTvT4hGiM8qBDAjAP1dPAZDOwYmMysIJMoyqSbt+LnAR4cnOduQTp5l X-Received: by 2002:a17:906:8684:b0:7c1:a0e:77 with SMTP id g4-20020a170906868400b007c10a0e0077mr5819720ejx.29.1670400589727; Wed, 07 Dec 2022 00:09:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670400589; cv=none; d=google.com; s=arc-20160816; b=ahjbXGhd5VNtBcE9rmmoBcw3PPiCql3q1mwz7JXvi/8KNYATl1q5ggjebVz4A4rWPu WRXAIErd3s5w4nghhMB83VqcJTRID9T+jsiwfAnE7VnsVf6LD3ho9yqMMmQONDe+0CGJ WiJTAOuFMPRGulQkMEp7qOr5Z1jGC1eGMZOwsj/rs9Yu15X+XRn4+bg+S6JgcD6FrPFV I9R3+lgi7J4EqQQu3sWLEyhaMdt63TR1ZjSblXjeYDOnWphrlbY4Gd63mrFcJRrYY6nE d1+BaweZBWhMcd/5ZshZmjta+fEZ+FIggdgiDPQX2Tr54J6P6BPyuuEeuEvpM+9wOT9M bsDA== 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=iZBMyZDbc7QumwwSL0lohTnnIwNe3YkrpMxmaWTYx1A=; b=L4Uyez47B9WHFNmVGH86WNE4wW2wMRN046sGoPIVcrxIbkKJ5vse3NaJ/2WDGTTYA7 Ivfi5uEYsj3yS+6XdxLjWBdWdLbIN8g3gdCJHDyifc6JznHL1qQqSJPJ6vBefhYiqm90 ktd8EXaGQNcTNSpuwppsr7ZtduIPRVFi7tpGve3QpVnXyaufarhKb6lSG33yvtYxTabX 3q0M2lwK4wfmcGhetaPCW3DdFNdIkBSMBxMdXQ/JAL572R0WuioPFG3AU3MEjb4fPJMa NZhAZWBhDfO7n/eybPMra2pjGd9g8QlSdy/JNFDiF651WzIqlN29KFrIGqJy97iOtFbt RqJg== 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 z5-20020a056402274500b0045b293121f1si4583194edd.12.2022.12.07.00.09.31; Wed, 07 Dec 2022 00:09:49 -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 S229781AbiLGH6q (ORCPT + 77 others); Wed, 7 Dec 2022 02:58:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229915AbiLGH6l (ORCPT ); Wed, 7 Dec 2022 02:58:41 -0500 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 828DD2B1BB; Tue, 6 Dec 2022 23:58:39 -0800 (PST) Received: by verein.lst.de (Postfix, from userid 2407) id DB37E68AA6; Wed, 7 Dec 2022 08:58:34 +0100 (CET) Date: Wed, 7 Dec 2022 08:58:34 +0100 From: Christoph Hellwig To: Max Gurtovoy Cc: Jason Gunthorpe , 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: <20221207075834.GC2283@lst.de> References: <20221206055816.292304-2-lei.rao@intel.com> <20221206061940.GA6595@lst.de> <20221206135810.GA27689@lst.de> <20221206153811.GB2266@lst.de> <20221206165503.GA8677@lst.de> <2975e217-749b-6929-cd2d-4b6276ef33d1@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2975e217-749b-6929-cd2d-4b6276ef33d1@nvidia.com> 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 04:30:20AM +0200, Max Gurtovoy wrote: > I'm not sure how awkward is for migration driver to ask the controlling > device driver to operate a migration action. It can't. That's the whole point. The controlled function that is being migrate must be absolutely unaware of that (except for things like quiescing access or FLRs that could happen anyway), because otherwise your have a fundamental information leak. > The controlling device driver can expose limited API for that matter. No, it can't. It must be in charge. > Also the concept of primary controller that control it's secondary > controllers is already in the SPEC so we can use it. It's not introduced in > this RFC but we're here to fix it. Yes, it is as I've pointed out multiple times. But, that relationship is only visible to the primary controller. It also doesn't help with the general problem where the secondary controller must be able to completely change it's identify and thus the subsystem. > In our case the primary controller is the PF and the secondary controllers > are the VFs. Yes, that's your case, and probably a very common one. But also far from the only one, so there is no way Linux or the specification can rely on that dumb fact. Never mind that there are virtualization schemes (look at the s390 code) where the PF to VF relationship gets lost.