VirtualBox

Changeset 30813 in vbox


Ignore:
Timestamp:
Jul 14, 2010 9:53:09 AM (15 years ago)
Author:
vboxsync
Message:

Flush dangling R3 & R0 PGM cr3 pointers when unmapping a chunk

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

Legend:

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

    r30761 r30813  
    12131213        pPGM->GCPhysCR3        = NIL_RTGCPHYS;
    12141214
     1215        pPGM->pGst32BitPdR3    = NULL;
    12151216        pPGM->pGstPaePdptR3    = NULL;
     1217        pPGM->pGstAmd64Pml4R3  = NULL;
    12161218#ifndef VBOX_WITH_2X_4GB_ADDR_SPACE
     1219        pPGM->pGst32BitPdR0    = NIL_RTR0PTR:
    12171220        pPGM->pGstPaePdptR0    = NIL_RTR0PTR;
     1221        pPGM->pGstAmd64Pml4R0  = NIL_RTR0PTR;
    12181222#endif
     1223        pPGM->pGst32BitPdRC    = NIL_RTRCPTR;
    12191224        pPGM->pGstPaePdptRC    = NIL_RTRCPTR;
    12201225        for (unsigned i = 0; i < RT_ELEMENTS(pVCpu->pgm.s.apGstPaePDsR3); i++)
  • trunk/src/VBox/VMM/PGMInternal.h

    r30789 r30813  
    11651165    R3PTRTYPE(void *)                   pvR3;
    11661166    /** Live save per page tracking data. */
    1167     R3PTRTYPE(PPGMLIVESAVERAMPAGE)         paLSPages;
     1167    R3PTRTYPE(PPGMLIVESAVERAMPAGE)      paLSPages;
    11681168    /** The range description. */
    11691169    R3PTRTYPE(const char *)             pszDesc;
  • trunk/src/VBox/VMM/PGMPhys.cpp

    r30811 r30813  
    31883188}
    31893189
    3190 
     3190#if 1 /* HC_ARCH_BITS == 32 */
    31913191/**
    31923192 * Tree enumeration callback for dealing with age rollover.
     
    33833383            pVM->pgm.s.ChunkR3Map.c--;
    33843384
    3385             /* Chunk removed, so clear the chunk map TLB; PGMR3PhysChunkInvalidateTLB clears the page map TLB as well. */
    3386             PGMR3PhysChunkInvalidateTLB(pVM);
    3387 
    3388             /* Flush all REM caches. */
     3385            /* Flush dangling PGM pointers (R3 & R0 ptrs to GC physical addresses) */
     3386            for (VMCPUID idCpu = 0; idCpu < pVM->cCpus; idCpu++)
     3387            {
     3388                PVMCPU pVCpu = &pVM->aCpus[idCpu];
     3389                PPGMCPU pPGM = &pVCpu->pgm.s;
     3390
     3391                pPGM->pGst32BitPdR3    = NULL;
     3392                pPGM->pGstPaePdptR3    = NULL;
     3393                pPGM->pGstAmd64Pml4R3  = NULL;
     3394#ifndef VBOX_WITH_2X_4GB_ADDR_SPACE
     3395                pPGM->pGst32BitPdR0    = NIL_RTR0PTR:
     3396                pPGM->pGstPaePdptR0    = NIL_RTR0PTR;
     3397                pPGM->pGstAmd64Pml4R0  = NIL_RTR0PTR;
     3398#endif
     3399                for (unsigned i = 0; i < RT_ELEMENTS(pVCpu->pgm.s.apGstPaePDsR3); i++)
     3400                {
     3401                    pPGM->apGstPaePDsR3[i]             = NULL;
     3402#ifndef VBOX_WITH_2X_4GB_ADDR_SPACE
     3403                    pPGM->apGstPaePDsR0[i]             = NIL_RTR0PTR;
     3404#endif
     3405                }
     3406
     3407                /* Flush REM TLBs. */
     3408                CPUMSetChangedFlags(pVCpu, CPUM_CHANGED_GLOBAL_TLB_FLUSH);
     3409            }
     3410
     3411            /* Flush REM translation blocks. */
    33893412            REMFlushTBs(pVM);
    3390             for (VMCPUID idCpu = 0; idCpu < pVM->cCpus; idCpu++)
    3391                 CPUMSetChangedFlags(&pVM->aCpus[idCpu], CPUM_CHANGED_GLOBAL_TLB_FLUSH);
    33923413
    33933414            /* Flush the pgm pool cache; call the internal rendezvous handler as we're already in a rendezvous handler here. */
     
    34103431    AssertRC(rc);
    34113432}
     3433#endif /* HC_ARCH_BITS == 32 */
    34123434
    34133435/**
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