]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iommufd: Implement sw_msi support natively
authorJason Gunthorpe <jgg@nvidia.com>
Thu, 20 Feb 2025 01:31:41 +0000 (17:31 -0800)
committerJason Gunthorpe <jgg@nvidia.com>
Thu, 27 Feb 2025 19:29:35 +0000 (15:29 -0400)
commit40f5175d0eb77f902ba8e2a5df2a8f3a218c8843
tree2d7386d385c3f5c4ad40fd75527ea1acced1639c
parent748706d7ca06012621b32851b68136bf33613b9e
iommufd: Implement sw_msi support natively

iommufd has a model where the iommu_domain can be changed while the VFIO
device is attached. In this case, the MSI should continue to work. This
corner case has not worked because the dma-iommu implementation of sw_msi
is tied to a single domain.

Implement the sw_msi mapping directly and use a global per-fd table to
associate assigned IOVA to the MSI pages. This allows the MSI pages to
be loaded into a domain before it is attached ensuring that MSI is not
disrupted.

Link: https://patch.msgid.link/r/e13d23eeacd67c0a692fc468c85b483f4dd51c57.1740014950.git.nicolinc@nvidia.com
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/iommu/iommufd/device.c
drivers/iommu/iommufd/hw_pagetable.c
drivers/iommu/iommufd/iommufd_private.h
drivers/iommu/iommufd/main.c