vmm: Add support for multiple virtio-pmem devices

Until now, the VMM was only accepting a single instance of virtio-pmem
device. This commit extend the virtio-pmem support by allowing several
devices to be created for a single VM.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2019-06-28 01:45:58 -07:00
committed by Rob Bradford
parent 785db6295e
commit 34e09923a5
3 changed files with 75 additions and 67 deletions

View File

@@ -84,7 +84,8 @@ fn main() {
"Persistent memory parameters \"file=<backing_file_path>,\
size=<persistent_memory_size>\"",
)
.takes_value(true),
.takes_value(true)
.min_values(1),
)
.get_matches();
@@ -110,7 +111,7 @@ fn main() {
let fs: Option<Vec<&str>> = cmd_arguments.values_of("fs").map(|x| x.collect());
let pmem = cmd_arguments.value_of("pmem");
let pmem: Option<Vec<&str>> = cmd_arguments.values_of("pmem").map(|x| x.collect());
let vm_config = match config::VmConfig::parse(config::VmParams {
cpus,