mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: memory_actual_size reflects hotplug state
It is desirable to be able to track the progress of memory hotplug. Update the memory_actual_size field to query the current plugged size from virtio-mem to enable this. Signed-off-by: Jared White <git@jaredwhite.dev>
This commit is contained in:
@@ -834,6 +834,10 @@ impl Mem {
|
||||
})
|
||||
}
|
||||
|
||||
pub fn plugged_size(&self) -> u64 {
|
||||
self.config.lock().unwrap().plugged_size
|
||||
}
|
||||
|
||||
pub fn resize(&mut self, size: u64) -> result::Result<(), Error> {
|
||||
let mut config = self.config.lock().unwrap();
|
||||
config.resize(size).map_err(|e| {
|
||||
|
||||
Reference in New Issue
Block a user