VirtualBox

Changeset 18827 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 7, 2009 2:59:13 PM (16 years ago)
Author:
vboxsync
Message:

EM: SyncCR3 before calling TRPMR3SyncIDT.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/EM.cpp

    r18825 r18827  
    25122512static int emR3RawForcedActions(PVM pVM, PCPUMCTX pCtx)
    25132513{
    2514    /*
    2515     * Note that the order is *vitally* important!
    2516     * Also note that SELMR3UpdateFromCPUM may trigger VM_FF_SELM_SYNC_TSS.
    2517     */
     2514    /*
     2515     * Note that the order is *vitally* important!
     2516     * Also note that SELMR3UpdateFromCPUM may trigger VM_FF_SELM_SYNC_TSS.
     2517     */
    25182518
    25192519
     
    25302530    /*
    25312531     * Sync IDT.
     2532     *
     2533     * The CSAMR3CheckGates call in TRPMR3SyncIDT may call PGMPrefetchPage
     2534     * and PGMShwModifyPage, so we're in for trouble if for instance a
     2535     * PGMSyncCR3+pgmPoolClearAll is pending.
     2536     */
    25322537     */
    25332538    if (VM_FF_ISPENDING(pVM, VM_FF_TRPM_SYNC_IDT))
    25342539    {
     2540        if (   VM_FF_ISPENDING(pVM, VM_FF_PGM_SYNC_CR3)
     2541            && EMIsRawRing0Enabled(pVM)
     2542            && CSAMIsEnabled(pVM))
     2543        {
     2544            int rc = PGMSyncCR3(pVM, pCtx->cr0, pCtx->cr3, pCtx->cr4, VM_FF_ISSET(pVM, VM_FF_PGM_SYNC_CR3));
     2545            if (RT_FAILURE(rc))
     2546                return rc;
     2547        }
     2548
    25352549        int rc = TRPMR3SyncIDT(pVM);
    25362550        if (RT_FAILURE(rc))
     
    25592573        Assert(!VM_FF_ISPENDING(pVM, VM_FF_SELM_SYNC_GDT | VM_FF_SELM_SYNC_LDT));
    25602574
    2561         /* Prefetch pages for EIP and ESP */
     2575        /* Prefetch pages for EIP and ESP. */
    25622576        /** @todo This is rather expensive. Should investigate if it really helps at all. */
    25632577        rc = PGMPrefetchPage(pVM, SELMToFlat(pVM, DIS_SELREG_CS, CPUMCTX2CORE(pCtx), pCtx->rip));
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