Re: [PATCH] vfio: selftests: Skip vfio_dma_map_limit_test if mapping returns -EINVAL
From: Alex Mastro
Date: Fri Nov 07 2025 - 19:17:39 EST
On Fri, Nov 07, 2025 at 10:20:58PM +0000, David Matlack wrote:
> Skip vfio_dma_map_limit_test.{unmap_range,unmap_all} (instead of
> failing) on systems that do not support mapping in the page-sized region
> at the top of the u64 address space. Use -EINVAL as the signal for
> detecting systems with this limitation, as that is what both VFIO Type1
> and iommufd return.
>
> A more robust solution that could be considered in the future would be
> to explicitly check the range of supported IOVA regions and key off
> that, instead of inferring from -EINVAL.
>
> Fixes: de8d1f2fd5a5 ("vfio: selftests: add end of address space DMA map/unmap tests")
> Signed-off-by: David Matlack <dmatlack@xxxxxxxxxx>
Makes sense -- thanks David. Agree about keying this off
VFIO_IOMMU_TYPE1_INFO_CAP_IOVA_RANGE longer term.
Reviewed-by: Alex Mastro <amastro@xxxxxx>