vmm: Add 'hotplug_size' to memory zones

In anticipation for resizing support of an individual memory zone,
this commit introduces a new option 'hotplug_size' to '--memory-zone'
parameter. This defines the amount of memory that can be added through
each specific memory zone.

Because memory zone resize is tied to virtio-mem, make sure the user
selects 'virtio-mem' hotplug method, otherwise return an error.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2020-09-10 12:20:22 +02:00
parent 30ff7e108f
commit c645a72c17
5 changed files with 40 additions and 5 deletions

View File

@@ -121,7 +121,7 @@ fn create_app<'a, 'b>(
"User defined memory zone parameters \
\"size=<guest_memory_region_size>,file=<backing_file>,\
shared=on|off,hugepages=on|off,host_numa_node=<node_id>,\
id=<zone_identifier>\"",
id=<zone_identifier>,hotplug_size=<hotpluggable_memory_size>\"",
)
.takes_value(true)
.min_values(1)