]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iommufd/selftest: Add coverage for IOPF test
authorLu Baolu <baolu.lu@linux.intel.com>
Tue, 2 Jul 2024 06:34:44 +0000 (14:34 +0800)
committerJason Gunthorpe <jgg@nvidia.com>
Tue, 9 Jul 2024 16:54:32 +0000 (13:54 -0300)
commitd1211768b62d02e27b46a3ff78f739c4776a0f03
tree0a74255be9b16946bb6a21d221cefef3e2dfaf9d
parentddee19971081b42615d62f4fdada21274708ed4d
iommufd/selftest: Add coverage for IOPF test

Extend the selftest tool to add coverage of testing IOPF handling. This
would include the following tests:

- Allocating and destroying an iommufd fault object.
- Allocating and destroying an IOPF-capable HWPT.
- Attaching/detaching/replacing an IOPF-capable HWPT on a device.
- Triggering an IOPF on the mock device.
- Retrieving and responding to the IOPF through the file interface.

Link: https://lore.kernel.org/r/20240702063444.105814-11-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>
tools/testing/selftests/iommu/iommufd.c
tools/testing/selftests/iommu/iommufd_fail_nth.c
tools/testing/selftests/iommu/iommufd_utils.h