From 5620a4968b9c8c49a6928d58ef731fed81165dde Mon Sep 17 00:00:00 2001 From: Stanislav Shwartsman Date: Sat, 11 Jan 2020 07:04:44 +0000 Subject: [PATCH] set msr IA32_FEATURE_CTRL lock bit to ensure VMX is enabled - normally this should be done in Bios but init.cc can w/a --- bochs/cpu/init.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bochs/cpu/init.cc b/bochs/cpu/init.cc index 16fc49307..a528c7597 100644 --- a/bochs/cpu/init.cc +++ b/bochs/cpu/init.cc @@ -1048,7 +1048,7 @@ void BX_CPU_C::reset(unsigned source) if (source == BX_RESET_HARDWARE) { /* enable VMX, should be done in BIOS instead */ BX_CPU_THIS_PTR msr.ia32_feature_ctrl = - /*BX_IA32_FEATURE_CONTROL_LOCK_BIT | */BX_IA32_FEATURE_CONTROL_VMX_ENABLE_BIT; + BX_IA32_FEATURE_CONTROL_LOCK_BIT | BX_IA32_FEATURE_CONTROL_VMX_ENABLE_BIT; } #endif