1
0
Fork 0
mirror of https://github.com/hermitcore/libhermit.git synced 2025-03-09 00:00:03 +01:00

disable temporally VMX support

This commit is contained in:
Stefan Lankes 2016-01-29 14:36:59 +01:00
parent 5706e30be6
commit fa1ad2c0da

View file

@ -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