]> Gentwo Git Trees - linux/.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>
Fri, 21 Feb 2025 14:51:55 +0000 (10:51 -0400)
commit598749522d4254afb33b8a6c1bea614a95896868
tree59ab154c4f2bc1f3aae7e83d98d17d75bd7907c7
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