From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2068.outbound.protection.outlook.com. [40.107.93.68]) by gmr-mx.google.com with ESMTPS id i18si503170qtx.0.2021.12.10.04.30.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Dec 2021 04:30:31 -0800 (PST) Date: Fri, 10 Dec 2021 08:30:28 -0400 From: Jason Gunthorpe Subject: Re: [patch 21/32] NTB/msi: Convert to msi_on_each_desc() Message-ID: <20211210123028.GD6385@nvidia.com> References: <87k0go8432.ffs@tglx> <878rx480fk.ffs@tglx> <87sfv2yy19.ffs@tglx> <20211209162129.GS6385@nvidia.com> <878rwtzfh1.ffs@tglx> <20211209205835.GZ6385@nvidia.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Return-Path: jgg@nvidia.com MIME-Version: 1.0 To: "Tian, Kevin" Cc: Thomas Gleixner , "Jiang, Dave" , Logan Gunthorpe , LKML , Bjorn Helgaas , Marc Zygnier , Alex Williamson , "Dey, Megha" , "Raj, Ashok" , "linux-pci@vger.kernel.org" , Greg Kroah-Hartman , Jon Mason , Allen Hubbe , "linux-ntb@googlegroups.com" , "linux-s390@vger.kernel.org" , Heiko Carstens , Christian Borntraeger , "x86@kernel.org" , Joerg Roedel , "iommu@lists.linux-foundation.org" List-ID: On Fri, Dec 10, 2021 at 07:36:12AM +0000, Tian, Kevin wrote: > /* > * The MSIX mappable capability informs that MSIX data of a BAR can be mmapped > * which allows direct access to non-MSIX registers which happened to be within > * the same system page. > * > * Even though the userspace gets direct access to the MSIX data, the existing > * VFIO_DEVICE_SET_IRQS interface must still be used for MSIX configuration. ^^^^^^^^^^^^^^^^^^^^^ It is this I think we don't want, there should be no hypervisor involvment on installing the addr/data pair Guessing by what I saw in PPC there is a hypercall to install a MSI and the guest never touches the page even though it is mapped. Presumably there is some IR like thing making this secured PPC has the same basic problem, I think they have a hypercall to install a MSI, not a hypercall to provision a generic addr/data pair. Jason