[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: "Derrick, Jonathan" <jonathan.derrick@xxxxxxxxx>
- From: Jason Gunthorpe <jgg@xxxxxxxxxx>
- Date: Wed, 30 Sep 2020 09:57:33 -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=xUH51rA3HlHLJikqE7iyQmhXDVNQppUQ5K9nEJCgL5c=; b=bHLxeNeEd5yreVY5bWEPVBzjz/N8kto8yHsB2Pni3Ev3qLkaP0jScx7dCJMZJKyxNcQwbZw+kdgfD/g6bwML5lBlBm1PVaZB1sKDRGqZFJavvYvbR4Zcu28jLuIDmJSXjwZ5RQyFQtjVuz5u4f1754SRED/IDMLA8mBUyAhCVDtdD8bkjh0QFeHeEq2w+XzHlt9k6fejiJ8V8WMWVfomOLCuiSyb5b4Q+HwHHRy2LPTkdQSDDUHwxVPgyN+GSbitbFe7abYnsZImhiVyZ6nobzfBdDsYFkKi/tQQCpsEDPI98wCqH+IUpQj/hOD47r2OSDWrmlGp5+TWpFTDC1myFg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UjpbJ1re4W/9wjakAEdLliBAhIS7pf5Q5JGD5OgKeU/xsXuufIHTsAIqNWVC3hFhp2bHFEZjB9Jx8YqbXbA3kBSBmyXz+IEepXO64I2x5GC2y0S63sd1FaJVn7DEPIKHdSsSPFoZTTHYfA8noAxpVGsmAmouHtREEx7qVzj0Hh/lOaBQoFbUuRMn3IYZbxnMhxgNVEhzmlEb9zwAhDBxRbeJ1KR7Oqn475Y8rlvAWSyiwEQzxbpTPeAy+OBbY0Lfbql9xTXvBXIXgbM2QtihuoMtCoS6nVVZGetrBSKUn4B/+vW1x6doREhxK/2yFmwEJytFxSoh3k6JQUrQd6nOrQ==
- Cc: "tglx@xxxxxxxxxxxxx" <tglx@xxxxxxxxxxxxx>, "Williams, Dan J" <dan.j.williams@xxxxxxxxx>, "sivanich@xxxxxxx" <sivanich@xxxxxxx>, "wei.liu@xxxxxxxxxx" <wei.liu@xxxxxxxxxx>, "haiyangz@xxxxxxxxxxxxx" <haiyangz@xxxxxxxxxxxxx>, "Dey, Megha" <megha.dey@xxxxxxxxx>, "Lu, Baolu" <baolu.lu@xxxxxxxxx>, "Jiang, Dave" <dave.jiang@xxxxxxxxx>, "Tian, Kevin" <kevin.tian@xxxxxxxxx>, "jgross@xxxxxxxx" <jgross@xxxxxxxx>, "kys@xxxxxxxxxxxxx" <kys@xxxxxxxxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, "x86@xxxxxxxxxx" <x86@xxxxxxxxxx>, "rafael@xxxxxxxxxx" <rafael@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx" <iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx>, "maz@xxxxxxxxxx" <maz@xxxxxxxxxx>, "bhelgaas@xxxxxxxxxx" <bhelgaas@xxxxxxxxxx>, "linux-pci@xxxxxxxxxxxxxxx" <linux-pci@xxxxxxxxxxxxxxx>, "konrad.wilk@xxxxxxxxxx" <konrad.wilk@xxxxxxxxxx>, "alex.williamson@xxxxxxxxxx" <alex.williamson@xxxxxxxxxx>, "steve.wahl@xxxxxxx" <steve.wahl@xxxxxxx>, "boris.ostrovsky@xxxxxxxxxx" <boris.ostrovsky@xxxxxxxxxx>, "gregkh@xxxxxxxxxxxxxxxxxxx" <gregkh@xxxxxxxxxxxxxxxxxxx>, "rja@xxxxxxx" <rja@xxxxxxx>, "joro@xxxxxxxxxx" <joro@xxxxxxxxxx>, "sthemmin@xxxxxxxxxxxxx" <sthemmin@xxxxxxxxxxxxx>, "Pan, Jacob jun" <jacob.jun.pan@xxxxxxxxx>, "lorenzo.pieralisi@xxxxxxx" <lorenzo.pieralisi@xxxxxxx>, "linux-hyperv@xxxxxxxxxxxxxxx" <linux-hyperv@xxxxxxxxxxxxxxx>, "baolu.lu@xxxxxxxxxxxxxxx" <baolu.lu@xxxxxxxxxxxxxxx>
- Delivery-date: Wed, 30 Sep 2020 12:58:04 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Wed, Sep 30, 2020 at 12:45:30PM +0000, Derrick, Jonathan wrote:
> Hi Jason
>
> On Mon, 2020-08-31 at 11:39 -0300, Jason Gunthorpe wrote:
> > 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.
> We can disable the capture and remap in newer devices so we don't even
> need the irq domain.
You'd still need an irq domain, it just comes from
pci_subdevice_msi_create_irq_domain() instead of internal to this
driver.
> I would however like to determine if the MSI data bits could be used
> for individual devices to have the IRQ domain subsystem demultiplex the
> virq from that and eliminate the IRQ list iteration.
Yes, exactly. This new pci_subdevice_msi_create_irq_domain() creates
*proper* fully functional interrupts, no need for any IRQ handler in
this driver.
> A concern I have about that scheme is virtualization as I think those
> bits are used to route to the virtual vector.
It should be fine with this patch series, consult with Megha how
virtualization is working with IDXD/etc
Jason
|