main, config: Add support for --user-device

This allows the user to specify devices that are running in a different
userspace process and communicated with vfio-user.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2021-06-04 14:40:13 +00:00
parent 2e236c53c8
commit 7fbec7113e
2 changed files with 57 additions and 0 deletions

View File

@@ -279,6 +279,14 @@ fn create_app<'a, 'b>(
.min_values(1)
.group("vm-config"),
)
.arg(
Arg::with_name("user-device")
.long("user-device")
.help(config::UserDeviceConfig::SYNTAX)
.takes_value(true)
.min_values(1)
.group("vm-config"),
)
.arg(
Arg::with_name("vsock")
.long("vsock")
@@ -656,6 +664,7 @@ mod unit_tests {
iommu: false,
},
devices: None,
user_devices: None,
vsock: None,
iommu: false,
#[cfg(target_arch = "x86_64")]