Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions src/hyperlight_host/src/sandbox/hypervisor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use std::sync::OnceLock;
use crate::hypervisor::virtual_machine::kvm;
#[cfg(mshv3)]
use crate::hypervisor::virtual_machine::mshv;
use crate::hypervisor::virtual_machine::HypervisorType;

static AVAILABLE_HYPERVISOR: OnceLock<Option<HypervisorType>> = OnceLock::new();

Expand Down Expand Up @@ -65,19 +66,6 @@ pub fn get_available_hypervisor() -> &'static Option<HypervisorType> {
})
}

/// The hypervisor types available for the current platform
#[derive(PartialEq, Eq, Debug)]
pub(crate) enum HypervisorType {
#[cfg(kvm)]
Kvm,

#[cfg(mshv3)]
Mshv,

#[cfg(target_os = "windows")]
Whp,
}

// Compiler error if no hypervisor type is available
#[cfg(not(any(kvm, mshv3, target_os = "windows")))]
compile_error!(
Expand Down
Loading