hypervisor: Add Hypervisor trait

As the only hypervisor that Cloud-Hypervisor supports is KVM, the
Hypervisor trait accomodates for the upcoming KVM implementation.

This trait will be instanciated at build time through hypervisor
specific features, i.e. it's not aiming at run-time selection of
hypervisors for Cloud-Hypervisor.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
Muminul Islam
2020-06-03 12:59:49 -07:00
committed by Samuel Ortiz
parent f5afc288d8
commit 683210d6e9
2 changed files with 110 additions and 0 deletions

View File

@@ -21,11 +21,15 @@
/// KVM implementation module
pub mod kvm;
/// Hypevisor related module
pub mod hypervisor;
/// Vm related module
pub mod vm;
/// CPU related module
mod cpu;
pub use crate::hypervisor::{Hypervisor, HypervisorError};
pub use cpu::{HypervisorCpuError, Vcpu};
pub use kvm::*;