diff options
| author | David Matlack <dmatlack@google.com> | 2026-01-15 00:12:52 +0300 |
|---|---|---|
| committer | Alex Williamson <alex@shazbot.org> | 2026-01-19 20:06:30 +0300 |
| commit | 1c588bca3bd5b39c93a28a5986bf82ebfb05eec2 (patch) | |
| tree | 07a421f79aead39c8df4c43051ec3ef9d3b333cc | |
| parent | 080723f4d4c3c6fb0720aae614deb1f30ee9ef2e (diff) | |
| download | linux-1c588bca3bd5b39c93a28a5986bf82ebfb05eec2.tar.xz | |
vfio: selftests: Drop IOMMU mapping size assertions for VFIO_TYPE1_IOMMU
Drop the assertions about IOMMU mappings sizes for VFIO_TYPE1_IOMMU
modes (both the VFIO mode and the iommufd compatibility mode). These
assertions fail when CONFIG_IOMMUFD_VFIO_CONTAINER is enabled, since
iommufd compatibility mode provides different huge page behavior than
VFIO for VFIO_TYPE1_IOMMU. VFIO_TYPE1_IOMMU is an old enough interface
that it's not worth changing the behavior of VFIO and iommufd to match
nor care about the IOMMU mapping sizes.
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Link: https://lore.kernel.org/kvm/20260109143830.176dc279@shazbot.org/
Signed-off-by: David Matlack <dmatlack@google.com>
Link: https://lore.kernel.org/r/20260114211252.2581145-1-dmatlack@google.com
Signed-off-by: Alex Williamson <alex@shazbot.org>
| -rw-r--r-- | tools/testing/selftests/vfio/vfio_dma_mapping_test.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tools/testing/selftests/vfio/vfio_dma_mapping_test.c b/tools/testing/selftests/vfio/vfio_dma_mapping_test.c index 3d2f44f9c62f..abb170bdcef7 100644 --- a/tools/testing/selftests/vfio/vfio_dma_mapping_test.c +++ b/tools/testing/selftests/vfio/vfio_dma_mapping_test.c @@ -161,12 +161,8 @@ TEST_F(vfio_dma_mapping_test, dma_map_unmap) if (rc == -EOPNOTSUPP) goto unmap; - /* - * IOMMUFD compatibility-mode does not support huge mappings when - * using VFIO_TYPE1_IOMMU. - */ - if (!strcmp(variant->iommu_mode, MODE_IOMMUFD_COMPAT_TYPE1)) - mapping_size = SZ_4K; + if (self->iommu->mode->iommu_type == VFIO_TYPE1_IOMMU) + goto unmap; ASSERT_EQ(0, rc); printf("Found IOMMU mappings for IOVA 0x%lx:\n", region.iova); |
