vmm: Add "--platform"

This currently contains only the number over PCI segments to create.
This is limited to 16 at the moment which should allow 496 user specified
PCI devices.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2021-10-11 15:51:30 +01:00
parent e3c35a3579
commit f8d9c073f0
2 changed files with 90 additions and 1 deletions

View File

@@ -155,6 +155,15 @@ fn create_app<'a, 'b>(
.default_value(default_vcpus)
.group("vm-config"),
)
.arg(
Arg::with_name("platform")
.long("platform")
.help(
"num_pci_segments=<num pci segments>",
)
.takes_value(true)
.group("vm-config"),
)
.arg(
Arg::with_name("memory")
.long("memory")
@@ -687,6 +696,7 @@ mod unit_tests {
watchdog: false,
#[cfg(feature = "tdx")]
tdx: None,
platform: None,
};
aver_eq!(tb, expected_vm_config, result_vm_config);