vmm, main: Add optional "hotplug_size" to --mem

This specifies how much address space should be reserved for hotplugging
of RAM. This space is reserved by adding move the start of the device
area by the desired amount.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2020-01-07 11:25:55 +00:00
committed by Samuel Ortiz
parent f1b6657833
commit f5137e84bb
4 changed files with 21 additions and 2 deletions

View File

@@ -94,7 +94,8 @@ fn create_app<'a, 'b>(
.long("memory")
.help(
"Memory parameters \"size=<guest_memory_size>,\
file=<backing_file_path>,mergeable=on|off\"",
file=<backing_file_path>,mergeable=on|off,\
hotplug_size=<hotpluggable_memory_size>\"",
)
.default_value(&default_memory)
.group("vm-config"),
@@ -451,6 +452,7 @@ mod unit_tests {
size: 536_870_912,
file: None,
mergeable: false,
hotplug_size: None,
},
kernel: None,
cmdline: CmdlineConfig {