hypervisor: Add Vcpu trait

This Vcpu trait should be implemented by each underlying hypervisor.

Previously created hypervisor object should create the VM based on
already selected hypervisor and Vm object should create this vcpu
object based on same hyperviosr. Each of this object should be
referenced by trait object i.e <dyn Vcpu>.

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:23:56 -07:00
committed by Samuel Ortiz
parent 56a1638517
commit f9b51a41b5
6 changed files with 363 additions and 1 deletions

View File

@@ -6,3 +6,23 @@
//
// Copyright 2018-2019 CrowdStrike, Inc.
//
//
//! A generic abstraction around hypervisor functionality
//!
//! This crate offers a trait abstraction for underlying hypervisors
//!
//! # Platform support
//!
//! - x86_64
//! - arm64
//!
/// KVM implementation module
pub mod kvm;
/// CPU related module
mod cpu;
pub use cpu::{HypervisorCpuError, Vcpu};
pub use kvm::*;