vmm: memory_manager: Write all guest region to disk

As a mirror of bdbea19e23 which ensured
that GuestMemoryMmap::read_exact_from() was used to read all the file to
the region ensure that all the guest memory region is written to disk.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2020-10-27 15:50:35 +00:00 committed by Bo Chen
parent be1b6bc1e1
commit 21db6f53c8

View File

@ -1871,7 +1871,7 @@ impl Transportable for MemoryManager {
.map_err(|e| MigratableError::MigrateSend(e.into()))?;
guest_memory
.write_to(
.write_all_to(
region.start_addr,
&mut memory_region_file,
region.size as usize,