[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 15:47:55 -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=uH2xIbjwd+K0IVVyMbcHdCkr4lTYL7oK9z/oNdMIMes=; b=W3N7/kizjs87GIFQsjB60Jf8BNEvRteaJWRYja9byCr/DTKPeeqAZ3vlWKs/1CwcA7a8HGt8yedODr93NLaauN1EC/h9iVNJH3irsFMwhEHzzsTwHqvABmXQr3+xkH2IfHhujrNH9dmQ9T6QxQ4cYu13j6gxexvhq9VlYQ6SpNfFgShkgT99G1zMHtUUF4aMq0Mvt1H87tYyufhk/RTrJCNlYKptZzCkeMPetreYZgNtYvYvu96TbDulBQbEuDrbPIEBvAopfJYfQmHriDDEURLfQ9fbAOmK3u0kD0NfcmBh5NMJdolmWvzA26CI63tkzKNDfEfutoMUtSA+P8fZJQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JFKFJ522L2K3NKKekbd7Xexje1LwW+tdbebuZl2r8cmn2hWq30APxFjX5SFKD9LvsqJrheeWQKyg1zBOjEZDbCYiIiGPdtsbzxsLhFd7VSIY4ldqvZyyTW/YMTpoBpGSTyebMfuiPuXEwmwZYOLSTin6OQr0iBj47zmeAM3SAEstPOAYZbcC8Muu9gnOCGnHVeJSLq8ZVCSVM4vR/d6Y1p5c4HKShXi1FH4Lv4cpkLWkUEOvOsv4+9aaq3rsmsHFylgVTrUs8wptjCLtve8LLaXLAjg7l8SqkfJ4ACmkKWpGWABmG27mBQibW3dwZcorgP9a7M9MJsc/yeAJ4piY0g==
- Cc: "tglx@xxxxxxxxxxxxx" <tglx@xxxxxxxxxxxxx>, "Williams, Dan J" <dan.j.williams@xxxxxxxxx>, "sivanich@xxxxxxx" <sivanich@xxxxxxx>, "jgross@xxxxxxxx" <jgross@xxxxxxxx>, "haiyangz@xxxxxxxxxxxxx" <haiyangz@xxxxxxxxxxxxx>, "Dey, Megha" <megha.dey@xxxxxxxxx>, "kys@xxxxxxxxxxxxx" <kys@xxxxxxxxxxxxx>, "Jiang, Dave" <dave.jiang@xxxxxxxxx>, "Tian, Kevin" <kevin.tian@xxxxxxxxx>, "wei.liu@xxxxxxxxxx" <wei.liu@xxxxxxxxxx>, "Lu, Baolu" <baolu.lu@xxxxxxxxx>, "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>, "Pan, Jacob jun" <jacob.jun.pan@xxxxxxxxx>, "sthemmin@xxxxxxxxxxxxx" <sthemmin@xxxxxxxxxxxxx>, "linux-hyperv@xxxxxxxxxxxxxxx" <linux-hyperv@xxxxxxxxxxxxxxx>, "lorenzo.pieralisi@xxxxxxx" <lorenzo.pieralisi@xxxxxxx>, "baolu.lu@xxxxxxxxxxxxxxx" <baolu.lu@xxxxxxxxxxxxxxx>
- Delivery-date: Wed, 30 Sep 2020 18:48:23 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Wed, Sep 30, 2020 at 01:08:27PM +0000, Derrick, Jonathan wrote:
> +Megha
>
> On Wed, 2020-09-30 at 09:57 -0300, Jason Gunthorpe wrote:
> > 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 have this set which disables remapping and bypasses the creation of
> the IRQ domain:
> https://patchwork.ozlabs.org/project/linux-pci/list/?series=192936
After Thomas's series VMD needs to supply a hierarchical IRQ domain to
get the correct PCI originator. This instead of the x86 patch in that
series. I think that domain should be created by
pci_subdevice_msi_create_irq_domain(), at least I'd start there.
Jason
|