Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7605849rwb; Tue, 6 Dec 2022 07:46:05 -0800 (PST) X-Google-Smtp-Source: AA0mqf42a/W9penhBiP0UHgnsY2jxrwr0xxxINmtCdKcKmV/s5v/XcEIvlSzYDzrAMf7OP5b0JpQ X-Received: by 2002:a17:90a:5a41:b0:219:41ef:a812 with SMTP id m1-20020a17090a5a4100b0021941efa812mr43070648pji.153.1670341565034; Tue, 06 Dec 2022 07:46:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670341565; cv=none; d=google.com; s=arc-20160816; b=1BpC4qno3/0Cl46NDAWNrnIpaIXA+nMjtY43Yxb/XAHu4eCGKk33eacPrzXWF0c5dm s4eggcXuxBxiGcO36jnZdE2qYZyICrCpBUOSN2mcmsy67TSQjP+DvMPcnQUL1K+FbCNI cQw0G86TJUN4J6dY1dNdP8cOYJWbc23CiJAeZQLAHjpnx/LaUQDXomsSNqfDoM7dpbRt 0d/9ypWPecuJvL8EjMFZaVFbiUKWRkRFoTP2L+Ae7B+m/r61nzjm3EMIcHgHq05E2im9 iFyIod6xU2ez6rTsEEPJwbagT69S5coB2mAAyvgPfvrARCFEhTDsSzasNQ+JBW1d7+xx 1MrQ== 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=ECbvIPPYFOMRjt5hqTRnsP8IshA6qchKHswe2vHFjiI=; b=oeg3r/4yEz5wLlRZBjnbP0Z+vrWCIReGSTqlUCEShSmQEBos9XeST1z/fujXqUf8B4 bahqeOtU0dwr4PtEMehX5l3DHFKiR+bfjdzMFNlN1JQTAG5omj5+N23DBcrbOLu3S9b/ HLy8X8lVZ/wKURt/tehoSgHu8/FT2nNrlSfdW9A088gOOgmI3exMEcpFYdE7YYOQ21vr sA3zhmlkp7UhycdBHvSrHvgPYVigjdhSgHjf+FxgbnIUU5V7C4+2SsNkVnZnW9cLN7/M ALBDo2sIjuyndL0MzbWhCD1q4mAo22IKLc0bl26sL3Dxedt3+YKbiKrbM+QHpltHGbm4 Ev3w== 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 k1-20020a170902c40100b001895ef14f57si12223832plk.166.2022.12.06.07.45.53; Tue, 06 Dec 2022 07:46: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; 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 S234717AbiLFPfz (ORCPT + 78 others); Tue, 6 Dec 2022 10:35:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231249AbiLFPfx (ORCPT ); Tue, 6 Dec 2022 10:35:53 -0500 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E53A22B1B9; Tue, 6 Dec 2022 07:35:52 -0800 (PST) Received: by verein.lst.de (Postfix, from userid 2407) id A7D6168B05; Tue, 6 Dec 2022 16:35:46 +0100 (CET) Date: Tue, 6 Dec 2022 16:35:46 +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 5/5] nvme-vfio: Add a document for the NVMe device Message-ID: <20221206153546.GA2266@lst.de> References: <20221206062604.GB6595@lst.de> <20221206130901.GB24358@lst.de> <20221206140002.GB27689@lst.de> <20221206143126.GB30297@lst.de> <20221206150131.GA32365@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:28:12AM -0400, Jason Gunthorpe wrote: > I'm interested as well, my mental model goes as far as mlx5 and > hisillicon, so if nvme prevents the VFs from being contained units, it > is a really big deviation from VFIO's migration design.. In NVMe the controller (which maps to a PCIe physical or virtual function) is unfortunately not very self contained. A lot of state is subsystem-wide, where the subsystem is, roughly speaking, the container for all controllers that shared storage. That is the right thing to do for say dual ported SSDs that are used for clustering or multi-pathing, for tentant isolation is it about as wrong as it gets. There is nothing in the NVMe spec that prohibits your from implementing multiple subsystems for multiple functions of a PCIe device, but if you do that there is absolutely no support in the spec to manage shared resources or any other interaction between them.