Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7607366rwb; Tue, 6 Dec 2022 07:47:15 -0800 (PST) X-Google-Smtp-Source: AA0mqf5crW9+/nSe/37kkXQnU9mr8YO8UvQAsWuZklzI5BafGt+QORg9j6teoEbsyXCWu0/6liSd X-Received: by 2002:a17:903:40cb:b0:189:dd86:a1e0 with SMTP id t11-20020a17090340cb00b00189dd86a1e0mr8186586pld.78.1670341635121; Tue, 06 Dec 2022 07:47:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670341635; cv=none; d=google.com; s=arc-20160816; b=SpMpKMbWBQnKSmWAeFMUZRECwIHR6RLIN9xdteulVeMDhB7ZTafBc+rag9lk17VwUI no0PKpQKiwZRDuiLn87yegtg6ZU/+x++u+O+q5d0T2t0iX0s45CtINwNQHlkh1U9FG7k PWWyVm7VU/djk46uDZDgyPKnZEI0R18d9k3dQxJU8fuItKKzAhpYL3HDtPty0pj1xjvI cCKvljNIplsU4PsDubrwSvI22kPgaOwxa48R1NnK7A6DqGYVTxXXRD0x9bvbWixF9RV2 YyH3C94alnKxmIqWf/+L9tp8RlhijQownoEE2US6qOyp2VZprOf/aXfL7GipK0UmEblU aBQQ== 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=UU8AMEdCApUKn2yCNu179y3IuDBUbfO2XN1Qp+qLAs8=; b=G7s7K5wIi2FmTPnJWib/ohxWs2MjsdfrX1DnJaS+DqTJUiPPEsY9IB9CAUU0UiOMWA hbpv+b5wSEyLIHOWAC3V8VkHxlnJGeUpkxnrVYhoYkIVwlLdUkk3ubHx2PPrXbVytBSY XbIEDr1lVk/nEmDQ6c5rt4bZQdysSEzN6SntKEPJwKO6HrehqTHrQdbSQqc4zjVcPvvL WI9jPAh82wZYW78GKjJ4xkFkq6gfUq3hOXYPQJ4Gf5FdjT8E6PfJZrkGQu8ZuQbdWqHO GMtJSTRyre/iJCZTT1Cno8USx2JnFga9nK9SAy5SSHZaXQvwVsnzAkhyLOLNb4lXJZjb Gr0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=jG3sZcdZ; 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 v10-20020a63f20a000000b0047895cb23cdsi10717870pgh.647.2022.12.06.07.47.04; Tue, 06 Dec 2022 07:47:15 -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=jG3sZcdZ; 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 S233206AbiLFPWm (ORCPT + 78 others); Tue, 6 Dec 2022 10:22:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232037AbiLFPWh (ORCPT ); Tue, 6 Dec 2022 10:22:37 -0500 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC262E7 for ; Tue, 6 Dec 2022 07:22:35 -0800 (PST) Received: by mail-pj1-x102f.google.com with SMTP id w4-20020a17090ac98400b002186f5d7a4cso18377139pjt.0 for ; Tue, 06 Dec 2022 07:22:35 -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=UU8AMEdCApUKn2yCNu179y3IuDBUbfO2XN1Qp+qLAs8=; b=jG3sZcdZjSQIRjZkl/f7DOP3dlw758+HEdK7GWWq8fnj9XOdoNxOkBB2jC/8fB14wx 9FNJy2pQnOLNPshZ0wncMGcgTjWilHuX1Bof33jsFVE2FkTXuTJbGdHUPK3/27UaGkvK M5eCBf9DWrA3/swfuE4dabHXjTiAR1WKAKwpHstU30D9ufiWl2NcIxhMoypIVrjzmYCl spyYHwWMmjSH6fjzFZEmEiwvpNMjodZFbFQeR2MIYjLq4JYYpySczgRZTnLObyGe9JnD k6I7+5uanHUHMcum9tuQsR/k+FU6BcxcU7gl4DPlzzQZx8dB4g0Mi3WATLONu2k2T3NX tEOQ== 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=UU8AMEdCApUKn2yCNu179y3IuDBUbfO2XN1Qp+qLAs8=; b=dwHff0bBRnBYxLCJugZS+10Hzt413N/ZyKUShsNY85/SfTLUAn07ZYE7BGocIyY91j 5UOmeURF3xthRympw9SrjtV8AnH7pK9MMQOeQIGxfI/dWJ/WoZqYOcyJOV1yHJ3YPsck DCczksHpRK2gqIc4DZrY7boOatfcBwwBmMO1j8EC1bgg/jnMZx+HKNxQ7FZCHFKBYXXN V6UqAw7gER9DQnU4elPBbBcRYI4abm5eL12YkJaAJDhPlpEUkHxZtVTMfSAHf+SlEAUC 1H0I+pWpk+k3dDNGbGakliYUCrN94o/CbwgZSVZ/xMNMZhHxzlPimneo+2VCXeTjSTpD zaIQ== X-Gm-Message-State: ANoB5pnGjDO/zOD8tLVk3AOg3fyi6ZZeojme4LA/5EZ/sldhB/g2H447 HbWJyDipPtapc2WouzkjbxreWtVd3iuTiXWN X-Received: by 2002:a17:90b:2544:b0:20a:f341:4ed9 with SMTP id nw4-20020a17090b254400b0020af3414ed9mr98991840pjb.11.1670340155171; Tue, 06 Dec 2022 07:22:35 -0800 (PST) Received: from ziepe.ca ([206.223.160.26]) by smtp.gmail.com with ESMTPSA id n3-20020a170902d2c300b00176b84eb29asm12790880plc.301.2022.12.06.07.22.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Dec 2022 07:22:34 -0800 (PST) Received: from jgg by wakko with local (Exim 4.95) (envelope-from ) id 1p2ZmD-004cnQ-5r; Tue, 06 Dec 2022 11:22:33 -0400 Date: Tue, 6 Dec 2022 11:22:33 -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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221206135810.GA27689@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=unavailable 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 02:58:10PM +0100, Christoph Hellwig wrote: > Most importantly NVMe is very quiet on the relationship between > VFs and PFs, and there is no way to guarantee that a PF is, at the > NVMe level, much in control of a VF at all. In other words this > concept really badly breaks NVMe abstractions. Yeah, I think the spec effort is going to be interesting for sure. From a pure Linux and implementation perspective a decision must be made early on how to label the DMAs for kernel/qemu vs VM controlled items at the PCI TLP level. > controlled functions (which could very well be, and in some designs > are, additional PFs and not VFs) by controlling function. In principle PF vs VF doesn't matter much - the question is really TLP labeling. If the spec says RID A is the controlling RID and RID B is the guest RID, then it doesn't matter if they have a PF/VF relationship or PF/PF relationship. 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. Using VF RID / VF PASID is appealing at first glance, but there is list of PCI emulation details that have to be worked out for that to be good. eg what do you do with guest triggered FLR? Or guest triggered memory disable? How do you handle PCIe AER? Also lack of PASID support in CPUs is problematic. Lots of trade offs.. Jason