arch, pci, vmm: Initial switch to the hypervisor crate

Start moving the vmm, arch and pci crates to being hypervisor agnostic
by using the hypervisor trait and abstractions. This is not a complete
switch and there are still some remaining KVM dependencies.

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-01 19:29:54 -07:00
committed by Samuel Ortiz
parent c48d0c1a67
commit e4dee57e81
24 changed files with 294 additions and 1023 deletions

View File

@@ -10,6 +10,7 @@ extern crate vmm_sys_util;
extern crate clap;
use clap::{App, Arg, ArgGroup, ArgMatches};
use hypervisor::kvm::KvmHyperVisor as Hypervisor;
use libc::EFD_NONBLOCK;
use log::LevelFilter;
use seccomp::SeccompLevel;
@@ -282,7 +283,7 @@ fn start_vmm(cmd_arguments: ArgMatches) {
} else {
SeccompLevel::Advanced
};
let hypervisor = Hypervisor::new().unwrap();
let vmm_thread = match vmm::start_vmm_thread(
env!("CARGO_PKG_VERSION").to_string(),
api_socket_path,
@@ -290,6 +291,7 @@ fn start_vmm(cmd_arguments: ArgMatches) {
http_sender,
api_request_receiver,
&seccomp_level,
Arc::new(hypervisor),
) {
Ok(t) => t,
Err(e) => {