mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-11 22:21:36 +00:00
Use GuestRegionMmap::read_exact_from() to ensure that all of the file is read into the guest. This addresses an issue where GuestRegionMmap::read_from() was only copying the first 2GiB of the memory and so lead to snapshot-restore was failing when the guest RAM was 2GiB or greater. This change also propagates any error from the copying upwards. Signed-off-by: Rob Bradford <robert.bradford@intel.com>