summaryrefslogtreecommitdiff
path: root/drivers/iommu
diff options
context:
space:
mode:
authorJoao Martins <joao.m.martins@oracle.com>2024-02-02 16:34:11 +0300
committerJason Gunthorpe <jgg@nvidia.com>2024-02-06 18:31:45 +0300
commit407fc184f0e0bfde61026d6ce3fb1e70a15159a3 (patch)
treebc67c309fdab28df3122f572860f3d9f846cbe35 /drivers/iommu
parent2780025e01e2e1c92f83ee7da91d9727c2e58a3e (diff)
downloadlinux-407fc184f0e0bfde61026d6ce3fb1e70a15159a3.tar.xz
iommufd/selftest: Refactor dirty bitmap tests
Rework the functions that test and set the bitmaps to receive a new parameter (the pte_page_size) that reflects the expected PTE size in the page tables. The same scheme is still used i.e. even bits are dirty and odd page indexes aren't dirty. Here it just refactors to consider the size of the PTE rather than hardcoded to IOMMU mock base page assumptions. While at it, refactor dirty bitmap tests to use the idev_id created by the fixture instead of creating a new one. This is in preparation for doing tests with IOMMU hugepages where multiple bits set as part of recording a whole hugepage as dirty and thus the pte_page_size will vary depending on io hugepages or io base pages. Link: https://lore.kernel.org/r/20240202133415.23819-6-joao.m.martins@oracle.com Signed-off-by: Joao Martins <joao.m.martins@oracle.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/iommu')
0 files changed, 0 insertions, 0 deletions