From 8b55c74827075b2ad34cabf09e58b9978b83ac45 Mon Sep 17 00:00:00 2001 From: Luca Abeni Date: Thu, 23 Sep 2021 09:17:04 +0200 Subject: [PATCH 3/3] Do not refuse to work inside a VM --- hypervisor/src/vmx.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hypervisor/src/vmx.rs b/hypervisor/src/vmx.rs index 64e5c1f..600e910 100644 --- a/hypervisor/src/vmx.rs +++ b/hypervisor/src/vmx.rs @@ -57,7 +57,7 @@ pub fn read_dr7() -> u64 { fn vmx_available() -> bool { let result = unsafe { core::arch::x86_64::__cpuid(CPUIDLeaf::ProcessorInfoAndFeatures as u32) }; result.ecx & (CPUIDLeafProcessorInfoAndFeaturesECXBits::VMXAvailable as u32) != 0 - && result.ecx & (CPUIDLeafProcessorInfoAndFeaturesECXBits::HypervisorPresent as u32) == 0 + /* && result.ecx & (CPUIDLeafProcessorInfoAndFeaturesECXBits::HypervisorPresent as u32) == 0 */ } /// Gets the current VMCS revision identifier. -- 2.25.1