mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-22 11:22:26 +00:00
vmm: memory_manager: Add ACPI hotplug region to default memory zone
When memory is resized through ACPI, a new region is added to the guest memory. This region must also be added to the corresponding memory zone in order to keep everything in sync. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
parent
f1aa09f178
commit
d6db2fdf96
@ -1152,6 +1152,12 @@ impl MemoryManager {
|
|||||||
|
|
||||||
let region = self.add_ram_region(start_addr, size)?;
|
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
|
// Tell the allocator
|
||||||
self.allocator
|
self.allocator
|
||||||
.lock()
|
.lock()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user