Re: [PATCH v4 0/3] vfio: handle DMA map/unmap up to the addressable limit

From: Alejandro Jimenez

Date: Wed Oct 15 2025 - 17:25:25 EST




On 10/15/25 3:24 PM, Alex Williamson wrote:
On Sun, 12 Oct 2025 22:32:23 -0700
Alex Mastro <amastro@xxxxxx> wrote:

This patch series aims to fix vfio_iommu_type.c to support
VFIO_IOMMU_MAP_DMA and VFIO_IOMMU_UNMAP_DMA operations targeting IOVA
ranges which lie against the addressable limit. i.e. ranges where
iova_start + iova_size would overflow to exactly zero.

The series looks good to me and passes my testing. Any further reviews
from anyone? I think we should make this v6.18-rc material. Thanks,


I haven't had a chance yet to closely review the latest patchset versions, but I did test this v4 and confirmed that it solves the issue of not being able to unmap an IOVA range extending up to the address space boundary. I verified both with the simplified test case at:
https://gist.github.com/aljimenezb/f3338c9c2eda9b0a7bf5f76b40354db8

plus using QEMU's amd-iommu and a guest with iommu.passthrough=0 iommu.forcedac=1 (which is how I first found the problem).

So Alex Mastro, please feel free to add:

Tested-by: Alejandro Jimenez <alejandro.j.jimenez@xxxxxxxxxx>

for the series. I'll try to find time to review the patches in detail.

Thank you,
Alejandro

Alex