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 <muislam@microsoft.com>
This commit is contained in:
Muminul Islam 2024-05-01 14:36:09 -07:00 committed by Rob Bradford
parent 9e338d86f5
commit 3fe9b87736

View File

@ -390,6 +390,16 @@ pub trait Vm: Send + Sync + Any {
) -> Result<()> { ) -> Result<()> {
unimplemented!() unimplemented!()
} }
/// Pause the VM
fn pause(&self) -> Result<()> {
Ok(())
}
/// Resume the VM
fn resume(&self) -> Result<()> {
Ok(())
}
} }
pub trait VmOps: Send + Sync { pub trait VmOps: Send + Sync {