Re: [PATCH v4 02/21] iommufd: Add iommufd_sw_map_msi()

From: Jason Gunthorpe

Date: Thu Aug 27 2026 - 08:11:46 EST


On Thu, Aug 27, 2026 at 10:47:47AM +0200, Andrew Jones wrote:

> I think it should be possible to follow AMD's model more closely. I'll
> create one IOMMU-owned irqdomain and install it as each device's MSI
> parent at probe time, provided the device currently uses the expected
> IMSIC MSI domain, which will be the IOMMU irqdomain's parent. The
> irqdomain will contain no per-device or MSI-table state and its callbacks
> can recover the device and operate on its currently attached S2 domain.
> This is better than the per-device irqdomain since sharing it avoids
> redundant domains.

I would still like to go over this with Thomas. It does feel more
logical to me that there would be one irqdomain per MSI table.

I dislike this implicit weak coupling between the iommufd viommu
operating the S2 and representing the VM and the irqdomain then
"magically" discovering what VM it is part of and what MSI table the
device is supposed to us.

I also don't want the iommu side to be managing msi tables. It would
be more reasonable for the generic viommu world to create irqdomains
per-VM...

Jason