small comments updates in vmx code

This commit is contained in:
Stanislav Shwartsman 2012-09-13 05:33:05 +00:00
parent 125c6f0bde
commit 4f6557697b
2 changed files with 8 additions and 2 deletions

View File

@ -481,8 +481,8 @@ void BX_CPU_C::init_vmx_capabilities(void)
// [05] VPID Enable
// [06] WBINVD Exiting
// [07] Unrestricted Guest (require EPT)
// [08] Reserved
// [09] Reserved
// [08] Virtualize Apic Registers
// [09] Virtualize Interrupt Delivery
// [10] PAUSE Loop Exiting
// [11] RDRAND Exiting (require RDRAND instruction support)
// [12] Enable INVPCID instruction (require INVPCID instruction support)

View File

@ -1511,6 +1511,12 @@ Bit32u BX_CPU_C::VMenterLoadCheckGuestState(Bit64u *qualification)
#if BX_SUPPORT_X86_64
#if BX_SUPPORT_VMX >= 2
// modify EFER.LMA / EFER.LME before setting CR4
// It is recommended that 64-bit VMM software use the 1-settings of the "load IA32_EFER"
// VM entry control and the "save IA32_EFER" VM-exit control. If VMentry is establishing
// CR0.PG=0 and if the "IA-32e mode guest" and "load IA32_EFER" VM entry controls are
// both 0, VM entry leaves IA32_EFER.LME unmodified (i.e., the host value will persist
// in the guest) -- Quote from Intel SDM
if (vmentry_ctrls & VMX_VMENTRY_CTRL1_LOAD_EFER_MSR) {
BX_CPU_THIS_PTR efer.set32((Bit32u) guest.efer_msr);
}