vmm: Add support for creating virtio-watchdog

The watchdog device is created through the "--watchdog" parameter. At
most a single watchdog can be created per VM.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2020-09-25 10:39:45 +01:00
parent d2c7645731
commit 885ee9567b
5 changed files with 63 additions and 4 deletions

View File

@@ -236,6 +236,13 @@ fn create_app<'a, 'b>(
.min_values(1)
.group("vm-config"),
)
.arg(
Arg::with_name("watchdog")
.long("watchdog")
.help("Enable virtio-watchdog")
.takes_value(false)
.group("vm-config"),
)
.arg(
Arg::with_name("v")
.short("v")
@@ -593,6 +600,7 @@ mod unit_tests {
#[cfg(target_arch = "x86_64")]
sgx_epc: None,
numa: None,
watchdog: false,
};
aver_eq!(tb, expected_vm_config, result_vm_config);