virtio-devices: Add simple virtio-watchdog device

This device operates a single virtq. When the driver offers a descriptor
to the device it is interpreted as a "ping" to indicate that the guest
is alive. A periodic timer fires and if when the timer is fired there
has not been a "ping" from the guest then the device will reset the VM.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2020-09-25 10:35:13 +01:00
parent ae375434cd
commit d2c7645731
3 changed files with 464 additions and 0 deletions
+2
View File
@@ -43,6 +43,7 @@ pub mod seccomp_filters;
pub mod transport;
pub mod vhost_user;
pub mod vsock;
pub mod watchdog;
pub use self::balloon::*;
pub use self::block::*;
@@ -57,6 +58,7 @@ pub use self::net_util::*;
pub use self::pmem::*;
pub use self::rng::*;
pub use self::vsock::*;
pub use self::watchdog::*;
use vm_virtio::{queue::*, VirtioDeviceType};
const DEVICE_INIT: u32 = 0x00;