mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
main, vmm: Add mandatory id to memory zones
In anticipation for allowing memory zones to be removed, but also in anticipation for refactoring NUMA parameter, we introduce a mandatory 'id' option to the --memory-zone parameter. This forces the user to provide a unique identifier for each memory zone so that we can refer to these. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
@@ -44,6 +44,8 @@ use vm_migration::{
|
||||
Transportable,
|
||||
};
|
||||
|
||||
const DEFAULT_MEMORY_ZONE: &str = "mem0";
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
const X86_64_IRQ_BASE: u32 = 5;
|
||||
|
||||
@@ -426,6 +428,7 @@ impl MemoryManager {
|
||||
// Create a single zone from the global memory config. This lets
|
||||
// us reuse the codepath for user defined memory zones.
|
||||
let zones = vec![MemoryZoneConfig {
|
||||
id: String::from(DEFAULT_MEMORY_ZONE),
|
||||
size: config.size,
|
||||
file: None,
|
||||
shared: config.shared,
|
||||
|
||||
Reference in New Issue
Block a user