mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-21 20:15:21 +00:00
50da100afd
The implementation of the virtio-balloon was slightly wrong as it was generating the GPA (Guest Physical Address) from the PFN (Page Frame Number) which was a u32. That means the GPA was created as a u32, and later a cast was done to extend it to a u64 type. Unfortunately, by doing so, the GPA was wrong if the value was supposedly more than 32 bits. That's why the PFN is casted into a u64 before the GPA is generated, which creates the GPA on 64 bits directly. Additionally, this patch simplifies the process_queue() function, relying on multiple vm-memory helpers. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>