From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8EFBDC5517A for ; Wed, 11 Nov 2020 15:42:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 244872074B for ; Wed, 11 Nov 2020 15:42:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="sVzlTzvF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727329AbgKKPmU (ORCPT ); Wed, 11 Nov 2020 10:42:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727100AbgKKPmT (ORCPT ); Wed, 11 Nov 2020 10:42:19 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B850C0613D1; Wed, 11 Nov 2020 07:42:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=QDIYgmHBIy32D7QMJNlh1Fjiv1S5HS5loWTZCLGENSc=; b=sVzlTzvFGPcaqnv5C/H2WY6QKi /unIroT+1YmBBbvs8x+xexAEOhkNbqZDvS8PxUSO9q/HUDdE0beM8VeroRpSDI8SPMv5NNiQ1NJH/ lSI33hhfgTSmjUf2/nh5eXMoQ+zbvNz6k4ffHUvIWZV7xYrKCkfE4LtlQL9THAz5F133sQ986c7et kSA+KEkgmVYDvSSpYkEAzBIT7KjbPwLNXBr3rWkWD7TNe8CNSbODlZddMvphjrYbREixwvj7vQnyS IGKBbLyJhaSLtWGFIBkQholxO3GactuGlBeJt4HU+lA6tgUvbtxJizVX/J2+w/3vVWWTfHulqlRIK DUu2UOhw==; Received: from hch by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcsFz-0006Ri-Kf; Wed, 11 Nov 2020 15:41:59 +0000 Date: Wed, 11 Nov 2020 15:41:59 +0000 From: Christoph Hellwig To: David Woodhouse Cc: Thomas Gleixner , Jason Gunthorpe , Dan Williams , "Raj, Ashok" , "Tian, Kevin" , "Jiang, Dave" , Bjorn Helgaas , "vkoul@kernel.org" , "Dey, Megha" , "maz@kernel.org" , "bhelgaas@google.com" , "alex.williamson@redhat.com" , "Pan, Jacob jun" , "Liu, Yi L" , "Lu, Baolu" , "Kumar, Sanjay K" , "Luck, Tony" , "jing.lin@intel.com" , "kwankhede@nvidia.com" , "eric.auger@redhat.com" , "parav@mellanox.com" , "rafael@kernel.org" , "netanelg@mellanox.com" , "shahafs@mellanox.com" , "yan.y.zhao@linux.intel.com" , "pbonzini@redhat.com" , "Ortiz, Samuel" , "Hossain, Mona" , "dmaengine@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-pci@vger.kernel.org" , "kvm@vger.kernel.org" Subject: Re: [PATCH v4 06/17] PCI: add SIOV and IMS capability detection Message-ID: <20201111154159.GA24059@infradead.org> References: <20201104135415.GX2620339@nvidia.com> <20201106131415.GT2620339@nvidia.com> <20201106164850.GA85879@otc-nc-03> <20201106175131.GW2620339@nvidia.com> <20201107001207.GA2620339@nvidia.com> <87pn4nk7nn.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Sun, Nov 08, 2020 at 07:36:34PM +0000, David Woodhouse wrote: > So it does look like we're going to need a hypercall interface to > compose an MSI message on behalf of the guest, for IMS to use. In fact > PCI devices assigned to a guest could use that too, and then we'd only > need to trap-and-remap any attempt to write a Compatibility Format MSI > to the device's MSI table, while letting Remappable Format messages get > written directly. > > We'd also need a way for an OS running on bare metal to *know* that > it's on bare metal and can just compose MSI messages for itself. Since > we do expect bare metal to have an IOMMU, perhaps that is just a > feature flag on the IOMMU? Have the platform firmware advertise if it needs native or virtualized IMS handling. If it advertises neither don't support IMS?