diff options
author | Nicolin Chen <nicolinc@nvidia.com> | 2023-07-27 23:33:28 -0700 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2023-07-28 13:31:24 -0300 |
commit | c154660b6e26c3f0670a49f43f1fafa5d65f6d39 (patch) | |
tree | fb647a97f267f3b132c03549e7cda50e2adcd1be /drivers/iommu/iommufd/iommufd_test.h | |
parent | 70c16123d865046899c36e3655b2d611f38f51a3 (diff) | |
download | linux-stable-c154660b6e26c3f0670a49f43f1fafa5d65f6d39.tar.gz linux-stable-c154660b6e26c3f0670a49f43f1fafa5d65f6d39.tar.bz2 linux-stable-c154660b6e26c3f0670a49f43f1fafa5d65f6d39.zip |
iommufd/selftest: Add IOMMU_TEST_OP_ACCESS_REPLACE_IOAS coverage
Add a new IOMMU_TEST_OP_ACCESS_REPLACE_IOAS to allow replacing the
access->ioas, corresponding to the iommufd_access_replace() helper.
Then add replace coverage as a part of user_copy test case, which
basically repeats the copy test after replacing the old ioas with a new
one.
Link: https://lore.kernel.org/r/a4897f93d41c34b972213243b8dbf4c3832842e4.1690523699.git.nicolinc@nvidia.com
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Nicolin Chen <nicolinc@nvidia.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 dd9168a20ddf..258de2253b61 100644 --- a/drivers/iommu/iommufd/iommufd_test.h +++ b/drivers/iommu/iommufd/iommufd_test.h @@ -18,6 +18,7 @@ enum { IOMMU_TEST_OP_ACCESS_RW, IOMMU_TEST_OP_SET_TEMP_MEMORY_LIMIT, IOMMU_TEST_OP_MOCK_DOMAIN_REPLACE, + IOMMU_TEST_OP_ACCESS_REPLACE_IOAS, }; enum { @@ -91,6 +92,9 @@ struct iommu_test_cmd { struct { __u32 limit; } memory_limit; + struct { + __u32 ioas_id; + } access_replace_ioas; }; __u32 last; }; |