]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iommufd/selftest: Add IOPF support for mock device
authorLu Baolu <baolu.lu@linux.intel.com>
Tue, 2 Jul 2024 06:34:43 +0000 (14:34 +0800)
committerJason Gunthorpe <jgg@nvidia.com>
Tue, 9 Jul 2024 16:54:32 +0000 (13:54 -0300)
commitddee19971081b42615d62f4fdada21274708ed4d
treea5c45d98f9a978e1a0e6294bfea5d1a8374b7648
parent34765cbc679c59ea5d952d738d2d16bf4aadc497
iommufd/selftest: Add IOPF support for mock device

Extend the selftest mock device to support generating and responding to
an IOPF. Also add an ioctl interface to userspace applications to trigger
the IOPF on the mock device. This would allow userspace applications to
test the IOMMUFD's handling of IOPFs without having to rely on any real
hardware.

Link: https://lore.kernel.org/r/20240702063444.105814-10-baolu.lu@linux.intel.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/iommu/iommufd/iommufd_test.h
drivers/iommu/iommufd/selftest.c