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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like there are also a couple other things that are defined in both files.

I've had a look, and it looks like this file is not used at all, it may be an artifact of some conflict.
Can you remove it please?

If it turns out to not be used at all, could you modify the PR title and/or commit message to reflect that?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree with this! Thanks a lot for you contribution!

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