From fa1ad2c0dab4436e44301819019389fd7698b24d Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Fri, 29 Jan 2016 14:36:59 +0100 Subject: [PATCH] disable temporally VMX support --- hermit/arch/x86/kernel/processor.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hermit/arch/x86/kernel/processor.c b/hermit/arch/x86/kernel/processor.c index b4ebeecd1..c2716d5c7 100644 --- a/hermit/arch/x86/kernel/processor.c +++ b/hermit/arch/x86/kernel/processor.c @@ -273,11 +273,12 @@ int cpu_detection(void) { cr4 |= CR4_PGE; if (has_fsgsbase()) cr4 |= CR4_FSGSBASE; - if (has_vmx()) - cr4 |= CR4_VMXE; + //if (has_vmx()) + // cr4 |= CR4_VMXE; cr4 &= ~CR4_TSD; // => every privilege level is able to use rdtsc write_cr4(cr4); + if (first_time && has_fsgsbase()) { readfs = rdfsbase; @@ -318,8 +319,8 @@ int cpu_detection(void) { if (has_nx()) wrmsr(MSR_EFER, rdmsr(MSR_EFER) | EFER_NXE); - if (has_vmx()) - wrmsr(MSR_IA32_FEATURE_CONTROL, rdmsr(MSR_IA32_FEATURE_CONTROL) | 0x5); + //if (has_vmx()) + // wrmsr(MSR_IA32_FEATURE_CONTROL, rdmsr(MSR_IA32_FEATURE_CONTROL) | 0x5); writefs(0); #if MAX_CORES > 1