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:
Jared White
2026-04-05 21:36:07 -07:00
committed by Bo Chen
parent aef0a43b52
commit 77ce3f6cbf
5 changed files with 45 additions and 15 deletions
+8
View File
@@ -2822,6 +2822,14 @@ impl Vm {
self.device_manager.lock().unwrap().balloon_size()
}
/// Get the actual size of the virtio_mem regions
pub fn virtio_mem_plugged_size(&self) -> u64 {
self.memory_manager
.lock()
.unwrap()
.virtio_mem_plugged_size()
}
pub fn send_memory_fds(
&mut self,
socket: &mut UnixStream,