diff --git a/Cargo.toml b/Cargo.toml index e9139915a..98dc62466 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -52,6 +52,7 @@ acpi = ["vmm/acpi"] cmos = ["vmm/cmos"] fwdebug = ["vmm/fwdebug"] kvm = ["vmm/kvm"] +mshv = ["vmm/mshv"] io_uring = ["vmm/io_uring"] # Integration tests require a special environment to run in diff --git a/hypervisor/Cargo.toml b/hypervisor/Cargo.toml index 377ae9421..818dfda22 100644 --- a/hypervisor/Cargo.toml +++ b/hypervisor/Cargo.toml @@ -7,6 +7,7 @@ license = "Apache-2.0 OR BSD-3-Clause" [features] kvm = [] +mshv = [] [dependencies] anyhow = "1.0" diff --git a/hypervisor/src/lib.rs b/hypervisor/src/lib.rs index 052095aab..6d0336ba0 100644 --- a/hypervisor/src/lib.rs +++ b/hypervisor/src/lib.rs @@ -32,6 +32,10 @@ extern crate thiserror; /// KVM implementation module pub mod kvm; +/// Microsoft Hypervisor implementation module +#[cfg(all(feature = "mshv", target_arch = "x86_64"))] +pub mod mshv; + /// Hypevisor related module pub mod hypervisor; diff --git a/hypervisor/src/mshv/mod.rs b/hypervisor/src/mshv/mod.rs new file mode 100644 index 000000000..671abedd4 --- /dev/null +++ b/hypervisor/src/mshv/mod.rs @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: Apache-2.0 OR BSD-3-Clause +// +// Copyright © 2020, Microsoft Corporation +// + +#![allow(dead_code)] +#![allow(unused_imports)] +#![allow(unused_variables)] +#![allow(unused_macros)] +#![allow(non_upper_case_globals)] diff --git a/vmm/Cargo.toml b/vmm/Cargo.toml index 0a1448f27..d71e8b2bd 100644 --- a/vmm/Cargo.toml +++ b/vmm/Cargo.toml @@ -10,6 +10,7 @@ acpi = ["acpi_tables","devices/acpi", "arch/acpi"] cmos = ["devices/cmos"] fwdebug = ["devices/fwdebug"] kvm = ["hypervisor/kvm"] +mshv = ["hypervisor/mshv"] io_uring = ["virtio-devices/io_uring"] [dependencies]