VirtualBox

Changeset 44195 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Dec 21, 2012 10:39:53 AM (12 years ago)
Author:
vboxsync
Message:

VMM/VMMAll, VMMR3: forceflags for updating CR3 and PAE PDPEs.

Location:
trunk/src/VBox/VMM
Files:
4 edited

Legend:

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

    r43510 r44195  
    342342}
    343343
     344
     345/**
     346 * Return the PAE PDPE entries.
     347 *
     348 * @returns Pointer to the PAE PDPE array.
     349 * @param   pVCpu       Pointer to the VMCPU.
     350 */
     351VMMDECL(PX86PDPE) HMGetPaePdpes(PVMCPU pVCpu)
     352{
     353    return &pVCpu->hm.s.aPdpes[0];
     354}
     355
  • trunk/src/VBox/VMM/VMMAll/PGMAll.cpp

    r43953 r44195  
    16371637 *
    16381638 * @returns VBox status code.
    1639  * @param   pVCpu               The virtual CPU.
    1640  * @param   paPdpes             Where to return the four PDPEs.  The array
     1639 * @param   pVCpu               Pointer to the VMCPU.
     1640 * @param   paPdpes             Where to return the four PDPEs. The array
    16411641 *                              pointed to must have 4 entries.
    16421642 */
     
    16591659 *
    16601660 * @returns VBox status code.
    1661  * @param   pVCpu               The virtual CPU.
    1662  * @param   paPdpes             The four PDPE values.  The array pointed to
    1663  *                              must have exactly 4 entries.
     1661 * @param   pVCpu               Pointer to the VMCPU.
     1662 * @param   paPdpes             The four PDPE values. The array pointed to must
     1663 *                              have exactly 4 entries.
    16641664 *
    16651665 * @remarks No-long-jump zone!!!
     
    16841684        }
    16851685    }
     1686
     1687    VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_HM_UPDATE_PAE_PDPES);
    16861688    return VINF_SUCCESS;
    16871689}
     
    19691971        AssertRCSuccess(rc); /* Assumes VINF_PGM_SYNC_CR3 doesn't apply to nested paging. */ /** @todo this isn't true for the mac, but we need hw to test/fix this. */
    19701972    }
     1973
     1974    VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_HM_UPDATE_CR3);
    19711975    return rc;
    19721976}
  • trunk/src/VBox/VMM/VMMR3/EM.cpp

    r43872 r44195  
    13801380        PDMCritSectFF(pVCpu);
    13811381
     1382    /* Update CR3 (Nested Paging case for HM). */
     1383    if (VMCPU_FF_ISPENDING(pVCpu, VMCPU_FF_HM_UPDATE_CR3))
     1384    {
     1385        int rc2 = PGMUpdateCR3(pVCpu, CPUMGetGuestCR3(pVCpu));
     1386        if (RT_FAILURE(rc2))
     1387            return rc2;
     1388        Assert(!VMCPU_FF_ISPENDING(pVCpu, VMCPU_FF_HM_UPDATE_CR3));
     1389    }
     1390
     1391    /* Update PAE PDPEs. This must be done *after* PGMUpdateCR3() and used only by the Nested Paging case for HM. */
     1392    if (VMCPU_FF_ISPENDING(pVCpu, VMCPU_FF_HM_UPDATE_PAE_PDPES))
     1393    {
     1394        Assert(CPUMIsGuestInPAEMode(pVCpu));
     1395        PX86PDPE pPdpes = HMGetPaePdpes(pVCpu);
     1396        AssertPtr(pPdpes);
     1397
     1398        int rc2 = PGMGstUpdatePaePdpes(pVCpu, pPdpes);
     1399        if (RT_FAILURE(rc2))
     1400            return rc2;
     1401        Assert(!VMCPU_FF_ISPENDING(pVCpu, VMCPU_FF_HM_UPDATE_PAE_PDPES));
     1402    }
     1403
    13821404    if (VMCPU_FF_ISPENDING(pVCpu, VMCPU_FF_CSAM_PENDING_ACTION))
    13831405        CSAMR3DoPendingAction(pVM, pVCpu);
  • trunk/src/VBox/VMM/include/HMInternal.h

    r44146 r44195  
    692692        } s;
    693693    } PendingIO;
     694
     695    /** The PAE PDPEs used with Nested Paging (only valid when
     696     *  VMCPU_FF_HM_UPDATE_PAE_PDPES is set). */
     697    X86PDPE                 aPdpes[4];
    694698
    695699    /** Current shadow paging mode. */
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