diff --git a/vmm/src/memory_manager.rs b/vmm/src/memory_manager.rs index 76e64bbe8..ed863432f 100644 --- a/vmm/src/memory_manager.rs +++ b/vmm/src/memory_manager.rs @@ -1152,6 +1152,12 @@ impl MemoryManager { let region = self.add_ram_region(start_addr, size)?; + // Add region to the list of regions associated with the default + // memory zone. + if let Some(memory_zone) = self.memory_zones.get_mut(DEFAULT_MEMORY_ZONE) { + memory_zone.regions.push(Arc::clone(®ion)); + } + // Tell the allocator self.allocator .lock()