Re: [PATCH iommufd 4/9] iommufd: Convert to msi_device_has_secure_msi()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 12, 2022 at 04:17:58PM +0100, Thomas Gleixner wrote:

> Obvioulsy unless it's done somewhere early in the PCI discovery,
> i.e. before the discovery associated the domain pointer.

I thought the problem is more that the iommu drivers change the
assigned irq_domain:

void intel_irq_remap_add_device(struct dmar_pci_notify_info *info)
{
	if (!irq_remapping_enabled || pci_dev_has_special_msi_domain(info->dev))
		return;

	dev_set_msi_domain(&info->dev->dev, map_dev_to_ir(info->dev));
}

Which is ultimately called by 

	bus_register_notifier(&pci_bus_type, &dmar_pci_bus_nb);

And that compares with the iommu setup which is also done from a
bus notifier:

		nb[i].notifier_call = iommu_bus_notifier;
		bus_register_notifier(iommu_buses[i], &nb[i]);

So, I think, there is not reliable ordering between these two things.

At least that is why I was convinced we should not do the idea I
shared :)

Thanks,
Jason



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux