mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-07-07 10:15:45 +00:00
When restoring if a region of RAM is backed by anonymous memory i.e from memfd_create() then copy the contents of the ram from the file that has been saved to disk. Previously the code would map the memory from that file into the guest using a MAP_PRIVATE mapping. This has the effect of minimising the restore time but provides an issue where the restored VM does not have the same structure as the snapshotted VM, in particular memory is backed by files in the restored VM that were anonymously backed in the original. This creates two problems: * The snapshot data is mapped from files for the pages of the guest which prevents the storage from being reclaimed. * When snapshotting again the guest memory will not be correctly saved as it will have looked like it was backed by a file so it will not be written to disk but as it is a MAP_PRIVATE mapping the changes will never be written to the disk again. This results in incorrect behaviour. Signed-off-by: Rob Bradford <robert.bradford@intel.com> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |