VirtualBox

Changeset 76050 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Dec 7, 2018 11:14:56 AM (6 years ago)
Author:
vboxsync
Message:

VMM/IEM: Nested VMX: bugref:9180 Fixed VMCLEAR to use the guest-physical address rather than the guest-virtual address to offset into the VMCS while clearing state. Fixed VMPTRLD to write back to memory the current VMCS (if any) before loading a new current VMCS.

File:
1 edited

Legend:

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

    r76041 r76050  
    79207920    else
    79217921    {
    7922         rcStrict = PGMPhysSimpleWriteGCPhys(pVCpu->CTX_SUFF(pVM), GCPtrVmcs + RT_UOFFSETOF(VMXVVMCS, fVmcsState),
     7922        AssertCompileMemberSize(VMXVVMCS, fVmcsState, sizeof(fVmcsStateClear));
     7923        rcStrict = PGMPhysSimpleWriteGCPhys(pVCpu->CTX_SUFF(pVM), GCPhysVmcs + RT_UOFFSETOF(VMXVVMCS, fVmcsState),
    79237924                                            (const void *)&fVmcsStateClear, sizeof(fVmcsStateClear));
    79247925        if (RT_FAILURE(rcStrict))
     
    81038104
    81048105    /*
    8105      * We only maintain only the current VMCS in our virtual CPU context (CPUMCTX). Therefore,
    8106      * VMPTRLD shall always flush any existing current VMCS back to guest memory before loading
    8107      * a new VMCS as current.
    8108      */
    8109     if (IEM_VMX_GET_CURRENT_VMCS(pVCpu) != GCPhysVmcs)
    8110     {
     8106     * We maintain only the cache of the current VMCS in CPUMCTX. Therefore, VMPTRLD shall
     8107     * always flush the cache contents of any existing, current VMCS back to guest memory
     8108     * before loading a new VMCS as current.
     8109     */
     8110    if (   IEM_VMX_HAS_CURRENT_VMCS(pVCpu)
     8111        && IEM_VMX_GET_CURRENT_VMCS(pVCpu) != GCPhysVmcs)
    81118112        iemVmxCommitCurrentVmcsToMemory(pVCpu);
    8112         IEM_VMX_SET_CURRENT_VMCS(pVCpu, GCPhysVmcs);
    8113     }
     8113
     8114    IEM_VMX_SET_CURRENT_VMCS(pVCpu, GCPhysVmcs);
    81148115
    81158116    iemVmxVmSucceed(pVCpu);
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