mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
main, vmm: Let the user define distincts memory zones
Introducing a new CLI option --memory-zone letting the user specify custom memory zones. When this option is present, the --memory size must be explicitly set to 0. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
committed by
Samuel Ortiz
parent
d25ec66bb6
commit
be475ddc22
13
src/main.rs
13
src/main.rs
@@ -114,6 +114,18 @@ fn create_app<'a, 'b>(
|
||||
.default_value(&default_memory)
|
||||
.group("vm-config"),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("memory-zone")
|
||||
.long("memory-zone")
|
||||
.help(
|
||||
"User defined memory zone parameters \
|
||||
\"size=<guest_memory_region_size>,file=<backing_file>,\
|
||||
mergeable=on|off,shared=on|off,hugepages=on|off\"",
|
||||
)
|
||||
.takes_value(true)
|
||||
.min_values(1)
|
||||
.group("vm-config"),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("kernel")
|
||||
.long("kernel")
|
||||
@@ -522,6 +534,7 @@ mod unit_tests {
|
||||
hugepages: false,
|
||||
balloon: false,
|
||||
balloon_size: 0,
|
||||
zones: None,
|
||||
},
|
||||
kernel: Some(KernelConfig {
|
||||
path: PathBuf::from("/path/to/kernel"),
|
||||
|
||||
Reference in New Issue
Block a user