From 3fe9b87736aaf45972c718c51d915fafa815a812 Mon Sep 17 00:00:00 2001 From: Muminul Islam Date: Wed, 1 May 2024 14:36:09 -0700 Subject: [PATCH] hypervisor: Add pause/resume definitions to VM trait Add Pause/Resume functions for VM trait. For KVM it will be empty implementations. For MSHV it needs to freeze and unfreeze the partition. Signed-off-by: Muminul Islam --- hypervisor/src/vm.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hypervisor/src/vm.rs b/hypervisor/src/vm.rs index cafced0a1..bf57f2342 100644 --- a/hypervisor/src/vm.rs +++ b/hypervisor/src/vm.rs @@ -390,6 +390,16 @@ pub trait Vm: Send + Sync + Any { ) -> Result<()> { unimplemented!() } + + /// Pause the VM + fn pause(&self) -> Result<()> { + Ok(()) + } + + /// Resume the VM + fn resume(&self) -> Result<()> { + Ok(()) + } } pub trait VmOps: Send + Sync {