[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch V2 24/46] PCI: vmd: Mark VMD irqdomain with DOMAIN_BUS_VMD_MSI
- To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Jon Derrick <jonathan.derrick@xxxxxxxxx>
- From: Jason Gunthorpe <jgg@xxxxxxxxxx>
- Date: Mon, 31 Aug 2020 11:39:40 -0300
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CtpMo07Km2SIPag4AslKp4fwjafs5NXGuZAuwMjt+fg=; b=B/JQ2qSnNNMvGrRuxA/sCR9ef+9jYfnMupo5CorXHvdARN1MEZz+Hb0DyIMRHE9GM9qrXhyIqgYhSNU7kDH7/Q/GBeTkVMUOYEM3FxY4KN6iY+JAJ1YCHVt19k7ISFVGnIHi6JkAd6U3DmfLn5pMQrpk2SCqEhW9t7jzP8jOIGsjjIpjmeXdJuHdzPsySvV4KQ+UqKXillP5SO/Vlvx28UvGXTY90dNwlBt+LvgcMsCZeLwAcBZmuLaZO4U2OaH27zTBJ1KRNEfSwlchfLTisXAEfzal3zek+c9dQfMFHckImwUlUKzPj0PbXQKXtMvC0Sjizey2R2ySO2FMnFaeJQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Tmr++x5+Vbf5vD1kJspOAz7AdYDTLrEq7qaDUqws1rzgSTRfHnEcCbKwKvhs5GentmccuIjW5+ilxbCygykL7wDwCg/Qc5vXO2kKvv3jWD6bVwwe0ErpAWkmmdNobnRmbfC9h/U4Rr1Anrhc6I5zI3W0zPgZDeRkvhbJyiH8Ourt8OiWocc58a94Cgj64kOtiHp9rt/8ABiebpXEUVfVN7Vv1EOVlDZUwHfYZG0RNvSfy/VmEEgBfVn4vwer8yMvG6u0dFB0VZbaAAet1qcEnngFE9VQIebeV8SuZV8T7wQYDsoBF/p/QG4IiTHjZl0vryRS3FhGygwMTT5RO+/+uA==
- Authentication-results: linutronix.de; dkim=none (message not signed) header.d=none;linutronix.de; dmarc=none action=none header.from=nvidia.com;
- Cc: LKML <linux-kernel@xxxxxxxxxxxxxxx>, <x86@xxxxxxxxxx>, Joerg Roedel <joro@xxxxxxxxxx>, <iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx>, <linux-hyperv@xxxxxxxxxxxxxxx>, Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>, "Lu Baolu" <baolu.lu@xxxxxxxxxxxxxxx>, Wei Liu <wei.liu@xxxxxxxxxx>, "K. Y. Srinivasan" <kys@xxxxxxxxxxxxx>, Stephen Hemminger <sthemmin@xxxxxxxxxxxxx>, Steve Wahl <steve.wahl@xxxxxxx>, Dimitri Sivanich <sivanich@xxxxxxx>, "Russ Anderson" <rja@xxxxxxx>, <linux-pci@xxxxxxxxxxxxxxx>, Bjorn Helgaas <bhelgaas@xxxxxxxxxx>, Lorenzo Pieralisi <lorenzo.pieralisi@xxxxxxx>, "Konrad Rzeszutek Wilk" <konrad.wilk@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Marc Zyngier <maz@xxxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, "Rafael J. Wysocki" <rafael@xxxxxxxxxx>, "Megha Dey" <megha.dey@xxxxxxxxx>, Dave Jiang <dave.jiang@xxxxxxxxx>, "Alex Williamson" <alex.williamson@xxxxxxxxxx>, Jacob Pan <jacob.jun.pan@xxxxxxxxx>, Baolu Lu <baolu.lu@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Dan Williams <dan.j.williams@xxxxxxxxx>
- Delivery-date: Mon, 31 Aug 2020 14:40:01 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Wed, Aug 26, 2020 at 01:16:52PM +0200, Thomas Gleixner wrote:
> From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
>
> Devices on the VMD bus use their own MSI irq domain, but it is not
> distinguishable from regular PCI/MSI irq domains. This is required
> to exclude VMD devices from getting the irq domain pointer set by
> interrupt remapping.
>
> Override the default bus token.
>
> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Acked-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
> drivers/pci/controller/vmd.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> +++ b/drivers/pci/controller/vmd.c
> @@ -579,6 +579,12 @@ static int vmd_enable_domain(struct vmd_
> return -ENODEV;
> }
>
> + /*
> + * Override the irq domain bus token so the domain can be distinguished
> + * from a regular PCI/MSI domain.
> + */
> + irq_domain_update_bus_token(vmd->irq_domain, DOMAIN_BUS_VMD_MSI);
> +
Having the non-transparent-bridge hold a MSI table and
multiplex/de-multiplex IRQs looks like another good use case for
something close to pci_subdevice_msi_create_irq_domain()?
If each device could have its own internal MSI-X table programmed
properly things would work alot better. Disable capture/remap of the
MSI range in the NTB.
Then each device could have a proper non-multiplexed interrupt
delivered to the CPU.. Affinity would work properly, no need to share
IRQs (eg vmd_irq() goes away)/etc.
Something for the VMD maintainers to think about at least.
As I hear more about NTB these days a full MSI scheme for NTB seems
interesting to have in the PCI-E core code..
Jason
|