[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87wnypl5yc.fsf@nanos.tec.linutronix.de>
Date: Fri, 13 Nov 2020 14:52:27 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Marc Zyngier <maz@...nel.org>
Cc: Jason Gunthorpe <jgg@...dia.com>,
Ziyad Atiyyeh <ziyadat@...dia.com>,
Itay Aveksis <itayav@...dia.com>,
Moshe Shemesh <moshe@...dia.com>,
LKML <linux-kernel@...r.kernel.org>, x86@...nel.org,
Joerg Roedel <joro@...tes.org>,
iommu@...ts.linux-foundation.org, linux-pci@...r.kernel.org,
Bjorn Helgaas <bhelgaas@...gle.com>,
David Woodhouse <dwmw2@...radead.org>
Subject: Re: iommu/vt-d: Cure VF irqdomain hickup
On Fri, Nov 13 2020 at 09:19, Marc Zyngier wrote:
> On 2020-11-12 21:34, Thomas Gleixner wrote:
>> That would allow to add a irq_find_matching_fwspec() based lookup to
>> pci_msi_get_device_domain().
>
> Just so that I understand the issue: is the core of the problem that
> there is no 1:1 mapping between a PCI bus and a DMAR unit, and no
> firmware topology information to indicate which one to pick?
Yes, we don't have a 1:1 mapping and there is some info, but that's all
a horrible mess.
>> Though I'm not yet convinced that the outcome would be less horrible
>> than the hack in the DMAR driver when I'm taking all the other horrors
>> of x86 (including XEN) into account :)
>
> I tried to follow the notifier into the DMAR driver, ended up in the
> IRQ remapping code, and lost the will to live.
Please just don't look at that and stay alive :)
> I have a question though:
>
> In the bus notifier callback, you end-up in dmar_pci_bus_add_dev(),
> which calls intel_irq_remap_add_device(), which tries to set the MSI
> domain. Why isn't that enough? Are we still missing any information at
> that stage?
That works, but this code is not reached for VF devices ... See the
patch which cures that.
If we want to get rid of that mess we'd need to rewrite the DMAR IOMMU
device registration completely. I'll leave it as is for now. My will to
live is more important :)
Thanks
tglx
Powered by blists - more mailing lists