vmm: Update memory through DeviceManager

Whenever the VM memory is resized, DeviceManager needs to be notified
so that it can subsequently notify each virtio devices about it.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2020-03-23 12:10:26 +01:00
committed by Rob Bradford
parent bc874a9b6f
commit e54f8ec8a5
2 changed files with 24 additions and 4 deletions

View File

@@ -553,6 +553,12 @@ impl Vm {
.resize(desired_memory)
.map_err(Error::MemoryManager)?
{
self.device_manager
.lock()
.unwrap()
.update_memory()
.map_err(Error::DeviceManager)?;
self.device_manager
.lock()
.unwrap()