]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iommufd/selftest: Fix tests to use MOCK_PAGE_SIZE based buffer sizes
authorJoao Martins <joao.m.martins@oracle.com>
Thu, 27 Jun 2024 11:00:58 +0000 (12:00 +0100)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 28 Jun 2024 16:12:22 +0000 (13:12 -0300)
commitffa3c799ce157493615f9f3c2b3c9ba602d320b9
tree2616438c423f738f1246279775f6b63a3b51e120
parent33335584eb78c0bda21ff8d759c39e035abb48ac
iommufd/selftest: Fix tests to use MOCK_PAGE_SIZE based buffer sizes

commit a9af47e382a4 ("iommufd/selftest: Test IOMMU_HWPT_GET_DIRTY_BITMAP")
added tests covering edge cases in the boundaries of iova bitmap. Although
it used buffer sizes thinking in PAGE_SIZE (4K) as opposed to the
MOCK_PAGE_SIZE (2K) that is used in iommufd mock selftests. This meant that
isn't correctly exercising everything specifically the u32 and 4K bitmap
test cases. Fix selftests buffer sizes to be based on mock page size.

Link: https://lore.kernel.org/r/20240627110105.62325-5-joao.m.martins@oracle.com
Reported-by: Kevin Tian <kevin.tian@intel.com>
Closes: https://lore.kernel.org/linux-iommu/96efb6cf-a41c-420f-9673-2f0b682cac8c@oracle.com/
Fixes: a9af47e382a4 ("iommufd/selftest: Test IOMMU_HWPT_GET_DIRTY_BITMAP")
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Tested-by: Matt Ochs <mochs@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
tools/testing/selftests/iommu/iommufd.c