On 05-Nov-20 9:04 AM, Nithin Dabilpuram wrote:
Partial unmapping is not supported for VFIO IOMMU type1 by kernel. Though kernel gives return as zero, the unmapped size returned will not be same as expected. So check for returned unmap size and return error.For IOVA as PA, DMA mapping is already at memseg size granularity. Do the same even for IOVA as VA mode as DMA map/unmap triggered by heap allocations, maintain granularity of memseg page size so that heap expansion and contraction does not have this issue. For user requested DMA map/unmap disallow partial unmapping for VFIO type1. Fixes: 73a639085938 ("vfio: allow to map other memory regions") Cc: [email protected] Cc: [email protected] Signed-off-by: Nithin Dabilpuram <[email protected]> ---
Maybe i just didn't have enough coffee today, but i still don't see why this "partial unmap" thing exists.
We are already mapping the addresses page-by-page, so surely "partial" unmaps can't even exist in the first place?
-- Thanks, Anatoly

