mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: Create a MemoryZone structure
In order to anticipate the need for storing memory regions along with virtio-mem information for each memory zone, we create a new structure MemoryZone that will replace Vec<Arc<GuestRegionMmap>> in the hash map MemoryZones. This makes thing more logical as MemoryZones becomes a list of MemoryZone sorted by their identifier. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
+1
-1
@@ -404,7 +404,7 @@ impl Vm {
|
||||
if let Some(memory_zones) = &config.memory_zones {
|
||||
for memory_zone in memory_zones.iter() {
|
||||
if let Some(mm_zone) = mm_zones.get(memory_zone) {
|
||||
node.memory_regions.extend(mm_zone.clone());
|
||||
node.memory_regions.extend(mm_zone.regions().clone());
|
||||
} else {
|
||||
error!("Unknown memory zone '{}'", memory_zone);
|
||||
return Err(Error::InvalidNumaConfig);
|
||||
|
||||
Reference in New Issue
Block a user