Re: [PATCH v4 0/3] vfio: handle DMA map/unmap up to the addressable limit
From: Alex Mastro
Date: Sat Oct 25 2025 - 14:13:42 EST
Alex and Jason, during my testing, I found that the behavior of range-based
(!VFIO_DMA_UNMAP_FLAG_ALL) VFIO_IOMMU_UNMAP_DMA differs slightly when using
/dev/iommu as the container.
iommufd treats range-based unmap where there are no hits in the range as an
error, and the ioctl fails with ENOENT.
vfio_iommu_type1.c treats this as a success and reports zero bytes unmapped in
vfio_iommu_type1_dma_unmap.size.
It implies to me that we may need some more shimming in
drivers/iommu/iommufd/vfio_compat.c to iron out observable differences in UAPI
usage.
Addressing it would be outside the scope of this patch series, so this mail is
just to make note of my findings.