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

This commit is contained in:
Stanislav Shwartsman 2020-01-11 07:04:44 +00:00
parent 902ff1ef52
commit 5620a4968b

View File

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