Re: [PATCH v6 0/5] vfio: handle DMA map/unmap up to the addressable limit
From: David Matlack
Date: Fri Nov 07 2025 - 17:24:33 EST
On 2025-11-07 12:44 AM, David Matlack wrote:
> On 2025-10-28 09:14 AM, Alex Mastro wrote:
>
> > This series spends the first couple commits making mechanical
> > preparations before the fix lands in the third commit. Selftests are
> > added in the last two commits.
>
> The new unmap_range and unmap_all selftests are failing for me. They all fail
> when attempting to map in region at the top of the IOVA address space.
>
> # RUN vfio_dma_map_limit_test.iommufd.unmap_range ...
> Driver found: dsa
> tools/testing/selftests/vfio/lib/include/vfio_util.h:219: Assertion Failure
>
> Expression: __vfio_pci_dma_map(device, region) == 0
> Observed: 0xffffffffffffffea == 0
> [errno: 22 - Invalid argument]
For type1, I tracked down -EINVAL as coming from
vfio_iommu_iova_dma_valid() returning false.
The system I tested on only supports IOVAs up through
0x00ffffffffffffff.
Do you know what systems supports up to 0xffffffffffffffff? I would like
to try to make sure I am getting test coverage there when running these
tests.
In the meantime, I sent out a fix to skip this test instead of failing:
https://lore.kernel.org/kvm/20251107222058.2009244-1-dmatlack@xxxxxxxxxx/