VirtualBox

Changeset 77548 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Mar 4, 2019 5:36:46 AM (6 years ago)
Author:
vboxsync
Message:

VMM/IEM: Nested VMX: bugref:9180 VM-entry check; current VMCS cannot be a shadow VMCS during VM-entry.

Location:
trunk/src/VBox/VMM/VMMAll
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/HMVMXAll.cpp

    r77325 r77548  
    328328    VMXV_DIAG_DESC(kVmxVDiag_Vmentry_ProcCtls2Disallowed0     , "ProcCtls2Disallowed0"      ),
    329329    VMXV_DIAG_DESC(kVmxVDiag_Vmentry_PtrInvalid               , "PtrInvalid"                ),
     330    VMXV_DIAG_DESC(kVmxVDiag_Vmentry_PtrShadowVmcs            , "PtrShadowVmcs"             ),
    330331    VMXV_DIAG_DESC(kVmxVDiag_Vmentry_RealOrV86Mode            , "RealOrV86Mode"             ),
    331332    VMXV_DIAG_DESC(kVmxVDiag_Vmentry_SavePreemptTimer         , "SavePreemptTimer"          ),
  • trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h

    r77522 r77548  
    74157415    Assert(IEM_VMX_IS_ROOT_MODE(pVCpu));
    74167416
     7417    /*
     7418     * Basic VM-entry checks.
     7419     * The order of the CPL, current and shadow VMCS and block-by-MovSS are important.
     7420     * The checks following that do not have to follow a specific order.
     7421     *
     7422     * See Intel spec. 26.1 "Basic VM-entry Checks".
     7423     */
     7424
    74177425    /* CPL. */
    74187426    if (pVCpu->iem.s.uCpl == 0)
     
    74327440        Log(("%s: VMCS pointer %#RGp invalid -> VMFailInvalid\n", pszInstr, IEM_VMX_GET_CURRENT_VMCS(pVCpu)));
    74337441        pVCpu->cpum.GstCtx.hwvirt.vmx.enmDiag = kVmxVDiag_Vmentry_PtrInvalid;
     7442        iemVmxVmFailInvalid(pVCpu);
     7443        iemRegAddToRipAndClearRF(pVCpu, cbInstr);
     7444        return VINF_SUCCESS;
     7445    }
     7446
     7447    /* Current VMCS is not a shadow VMCS. */
     7448    if (!pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pVmcs)->u32VmcsRevId.n.fIsShadowVmcs)
     7449    { /* likely */ }
     7450    else
     7451    {
     7452        Log(("%s: VMCS pointer %#RGp is a shadow VMCS -> VMFailInvalid\n", pszInstr, IEM_VMX_GET_CURRENT_VMCS(pVCpu)));
     7453        pVCpu->cpum.GstCtx.hwvirt.vmx.enmDiag = kVmxVDiag_Vmentry_PtrShadowVmcs;
    74347454        iemVmxVmFailInvalid(pVCpu);
    74357455        iemRegAddToRipAndClearRF(pVCpu, cbInstr);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette