mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
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:
committed by
Samuel Ortiz
parent
c48d0c1a67
commit
e4dee57e81
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user