diff options
author | Nicolin Chen <nicolinc@nvidia.com> | 2023-07-17 15:12:12 -0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2023-07-26 10:20:26 -0300 |
commit | fa1ffdb9e2937d04657c33a146aa0d2cd39abba0 (patch) | |
tree | ae2032fb78081c4002439c0165ae649ea9756785 /drivers/iommu/iommufd/iommufd_test.h | |
parent | 83f7bc6fdfd2fca11f35c061194d60f88acb3086 (diff) | |
download | linux-stable-fa1ffdb9e2937d04657c33a146aa0d2cd39abba0.tar.gz linux-stable-fa1ffdb9e2937d04657c33a146aa0d2cd39abba0.tar.bz2 linux-stable-fa1ffdb9e2937d04657c33a146aa0d2cd39abba0.zip |
iommufd/selftest: Test iommufd_device_replace()
Allow the selftest to call the function on the mock idev, add some tests
to exercise it.
Link: https://lore.kernel.org/r/16-v8-6659224517ea+532-iommufd_alloc_jgg@nvidia.com
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Yi Liu <yi.l.liu@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/iommu/iommufd/iommufd_test.h')
-rw-r--r-- | drivers/iommu/iommufd/iommufd_test.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/iommu/iommufd/iommufd_test.h b/drivers/iommu/iommufd/iommufd_test.h index b3d69cca7729..e3f1035cbd64 100644 --- a/drivers/iommu/iommufd/iommufd_test.h +++ b/drivers/iommu/iommufd/iommufd_test.h @@ -17,6 +17,7 @@ enum { IOMMU_TEST_OP_ACCESS_PAGES, IOMMU_TEST_OP_ACCESS_RW, IOMMU_TEST_OP_SET_TEMP_MEMORY_LIMIT, + IOMMU_TEST_OP_MOCK_DOMAIN_REPLACE, }; enum { @@ -53,6 +54,9 @@ struct iommu_test_cmd { __u32 out_hwpt_id; } mock_domain; struct { + __u32 pt_id; + } mock_domain_replace; + struct { __aligned_u64 iova; __aligned_u64 length; __aligned_u64 uptr; |