hypervisor: Introduce VM state to Vm hypervisor trait

We may need to store hypervisor speciific data to the VM. This support is
needed for Microsoft hyperv implementations. This patch introduces two
new definitions to Vm trait and implements for KVM.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
Muminul Islam
2020-08-21 13:00:37 -07:00
committed by Sebastien Boeuf
parent 8962e25268
commit 77e901a602
3 changed files with 39 additions and 10 deletions

View File

@@ -52,6 +52,7 @@ pub use kvm::*;
pub use vm::{DataMatch, HypervisorVmError, Vm};
use std::sync::Arc;
pub fn new() -> std::result::Result<Arc<dyn Hypervisor>, HypervisorError> {
#[cfg(feature = "kvm")]
let hv = kvm::KvmHypervisor::new()?;