mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
mmap(NULL, ...) only guarantees page-sized alignment, so the device MMIO regions mapped for VFIO passthrough were not necessarily aligned on a huge page boundary and thus could not take fast paths in the kernel. Align the address to the largest possible size. This allows VFIO to take fast paths when walking the page table. Signed-off-by: Wei Liu <liuwe@microsoft.com> Assisted-by: Copilot:Opus-4.8 Assisted-by: Copilot:GPT-5.5