mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
The virtio-iommu translation required the whole [addr, addr+size) span to be covered by a single mapping. A guest is free to describe one contiguous buffer with several adjacent mappings: the specification lets the driver map at page granularity and the Linux IOMMU core splits a single mapping request at page size boundaries. A descriptor buffer backed this way was rejected as an invalid translation even though every page was mapped, wedging the device. Walk consecutive mappings when no single one covers the span, accepting the translation once the mappings are adjacent in IOVA space and contiguous in guest-physical space. A non-contiguous span cannot be represented by the single returned address and is still rejected. Assisted-by: Claude:Opus-4.8 Signed-off-by: Rob Bradford <rbradford@meta.com>