hypervisor: Introduce hypervisor crate

The purpose of this trait is to add support for other hypervisors than
KVM, like e.g. Microsoft Hyper-V.

Further commits will define additional hypervisor related traits like
Vcpu and Vm. Each of the supported hypervisor will need to implement all
traits defined from the hypervisor crate.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
Muminul Islam 2020-06-07 17:50:38 -07:00 committed by Samuel Ortiz
parent b969d92fe3
commit 56a1638517
4 changed files with 22 additions and 0 deletions

5
Cargo.lock generated
View File

@ -187,6 +187,7 @@ dependencies = [
"dirs", "dirs",
"epoll", "epoll",
"futures", "futures",
"hypervisor",
"lazy_static", "lazy_static",
"libc", "libc",
"log 0.4.8", "log 0.4.8",
@ -453,6 +454,10 @@ dependencies = [
"libc", "libc",
] ]
[[package]]
name = "hypervisor"
version = "0.1.0"
[[package]] [[package]]
name = "idna" name = "idna"
version = "0.2.0" version = "0.2.0"

View File

@ -14,6 +14,7 @@ arc-swap = ">=0.4.4"
clap = { version = "2.33.1", features=["wrap_help"] } clap = { version = "2.33.1", features=["wrap_help"] }
epoll = ">=4.0.1" epoll = ">=4.0.1"
futures = { version = "0.3.5", features = ["thread-pool"] } futures = { version = "0.3.5", features = ["thread-pool"] }
hypervisor = { path = "hypervisor" }
lazy_static = "1.4.0" lazy_static = "1.4.0"
libc = "0.2.71" libc = "0.2.71"
log = { version = "0.4.8", features = ["std"] } log = { version = "0.4.8", features = ["std"] }

8
hypervisor/Cargo.toml Normal file
View File

@ -0,0 +1,8 @@
[package]
name = "hypervisor"
version = "0.1.0"
authors = ["Muminul Islam<muislam@microsoft.com>"]
edition = "2018"
[dependencies]

8
hypervisor/src/lib.rs Normal file
View File

@ -0,0 +1,8 @@
// Copyright © 2019 Intel Corporation
//
// SPDX-License-Identifier: Apache-2.0
//
// Copyright © 2020, Microsoft Corporation
//
// Copyright 2018-2019 CrowdStrike, Inc.
//