Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7683380rwb; Tue, 6 Dec 2022 08:37:05 -0800 (PST) X-Google-Smtp-Source: AA0mqf7yRZcBgDL9mvdJv8aZsp/ZYz7yRJm6dynNkS7JBmymELm7wmuxIjc69rX2tPyC0QATeYuK X-Received: by 2002:a17:906:48c9:b0:7c0:eb33:e7c2 with SMTP id d9-20020a17090648c900b007c0eb33e7c2mr9868695ejt.666.1670344625549; Tue, 06 Dec 2022 08:37:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670344625; cv=none; d=google.com; s=arc-20160816; b=uvx+k0Lm2ENj9SCDZHy12TTcrYjQXJuC+CDHiVQrjxm1fFtGiYXUbggRZPok7wJVVM EGwCHcUX9SYqIYKLWMYcLEVUo8pkwss3z4Fld6P1H7t1XSIi9nrDkJbwjMK+/+aGi+/H JnqYEcdOJQMYXzPaAKei+ayHmUJkO49HdBcbDBB6tGaIyJeL5/AlcJZ2s1rOuN4S0RUE fTzr9lYnMrIv/3go2eoL64p2YxvEWIbHZB6eEEl29dbgq/mNsqb+nuQrC0q8y+TvMMi5 qhSCk5OA+w7Ft2exhlJqLCsZfBuHD1QaBUWV9T/NStqSmbzTb5MOw8bFDCjh7uKfC94P iDXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=gqqL0wzb/cn536XtYZtFOaEpIM6uV5P9yYi1coZmPF0=; b=foO0rdZoHt/kkk4IIgw/FGow91eCGpkxLug2ta4YRDy7dNtQp7aC1eNVt6cZ5yBBz2 jpwzQxy7WnIzyWjOWME/TivBUU12WHST75jMJr1U5aPeZta9MPIX2zKjXSJyNrOiJhAk 4msQZMo+mrqeWWgj8XoWLeQJMrAM9k+Wfx1SbixpjRfBqRhQdT1dyOIh8yRCRrzWX29B pxkdU5VbpHjhp7tZoQYeq5zk2U7y5JBmxKf9SI2Am7IAF11Skeb1kM+F6uD0SAMfRzr2 5zQLq8DrYFFKZjUJ8R002ul78rn2eyaFRAaiJZoe6cz/KIRHw2ZaoE3tgHRxsH+CcyWm mCPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=jp4VKKZJ; 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 ht15-20020a170907608f00b007c0e7acd184si5882210ejc.507.2022.12.06.08.36.39; Tue, 06 Dec 2022 08:37:05 -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=@ziepe.ca header.s=google header.b=jp4VKKZJ; 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 S232037AbiLFPvf (ORCPT + 78 others); Tue, 6 Dec 2022 10:51:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234506AbiLFPv1 (ORCPT ); Tue, 6 Dec 2022 10:51:27 -0500 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A65C286F3 for ; Tue, 6 Dec 2022 07:51:26 -0800 (PST) Received: by mail-pg1-x532.google.com with SMTP id r18so13704366pgr.12 for ; Tue, 06 Dec 2022 07:51:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=gqqL0wzb/cn536XtYZtFOaEpIM6uV5P9yYi1coZmPF0=; b=jp4VKKZJHmW9e+5o/XYsQYVzCWhlkU6zVHLYGWRQ6mL5NGoTJWhwjrvshgFBiI+mEZ hVt7JXaTWLM2BeUl+D0v+YiBr92Tfo/1eDlAmvK8unPQIMLXxTdQcEXHU7VcsOz6MymE gRhL84a73vXFw9Kzv8cmUMxo2gVtuR+sr+dL3bKLc50/L/IVfG4X81uc8EdEf2f935mh X1AffDI3sVE53IzMXO9e1awFVOLUYoOQV6+I5I7KcekR8ALznMH6UQKfKYU/rqJOs/vw kQif/TsZvMyXAftVb/QSfMwuKlHFJRLJHZZsLXPhluYpkqoOQjdNvnxlRGSCe921fY1g uZPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=gqqL0wzb/cn536XtYZtFOaEpIM6uV5P9yYi1coZmPF0=; b=RRfOOwOhKUOlAE/6EEUvKUcIE/eVHhx33XrlWWvY25UxGz4MeGQ2MyPub6vp7xslRn Es1SJnjQOvGFJQo1q8gS5vmEzAHTkoZa3z3Od/LqiyZ5tYeVPLwUTcSqZ9ZQVtPsswFA nRkg3lGQLChCJMSZMOISZqj0w9hxoGDw1lqelo90vQ23lIv7Na3kmIeHq+U+tiPpIosm oiSjvD/nyuTB7OehFkkAZ6bWLzQUIqmyQl/0p1ZS8voaQP7KkNoqhNiUHugx166wABtZ It8OsUqHQWrG+610zTXVJxpOJ/OMWeKyrXz9j+IXoUmG/gu2Pwtja31c2jOIRfolEaH1 qlbw== X-Gm-Message-State: ANoB5plAvNfUzGIbpOKa0DqYXub2UfSloxZwbhM/51V5bA7/sNDTx7Pl mU26aMtabKA+TU0uflU8KyTNwQ== X-Received: by 2002:aa7:8207:0:b0:576:7440:2478 with SMTP id k7-20020aa78207000000b0057674402478mr19328949pfi.51.1670341886129; Tue, 06 Dec 2022 07:51:26 -0800 (PST) Received: from ziepe.ca ([206.223.160.26]) by smtp.gmail.com with ESMTPSA id a4-20020a17090a480400b001fe39bda429sm10974521pjh.38.2022.12.06.07.51.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Dec 2022 07:51:25 -0800 (PST) Received: from jgg by wakko with local (Exim 4.95) (envelope-from ) id 1p2aE7-004dDy-Um; Tue, 06 Dec 2022 11:51:23 -0400 Date: Tue, 6 Dec 2022 11:51:23 -0400 From: Jason Gunthorpe To: Christoph Hellwig 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 Subject: Re: [RFC PATCH 1/5] nvme-pci: add function nvme_submit_vf_cmd to issue admin commands for VF driver. Message-ID: 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: <20221206153811.GB2266@lst.de> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 04:38:11PM +0100, Christoph Hellwig wrote: > > We have locking issues in Linux SW connecting different SW drivers for > > things that are not a PF/VF relationship, but perhaps that can be > > solved. > > And I think the only reasonable answer is that the entire workflow > must be 100% managed from the controlling function, and the controlled > function is just around for a ride, with the controlling function > enabling/disabling it as needed without ever interacting with software > that directly deals with the controlled function. 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. Adding another uAPI that can manipulate the same VFIO device from some unrelated chardev feels wrong. There are certain things that need to be co-ordinated for eveything to work. Like you can't suspend the VFIO device unless you promise to also stop MMIO operations. Stuff like FLR interfers with the migration operation and has to be co-ordinated. Some migration operation failures, like load failure, have to be healed through FLR. It really does not want to be two different uAPIs even if that is convenient for the kernel. I'd much rather try to fix the problems PASID brings that try to make this work :\ Jason