Changeset 24723 in vbox for trunk/src/VBox
- Timestamp:
- Nov 17, 2009 2:09:41 PM (15 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGM.cpp
r24711 r24723 1609 1609 PGM_REG_COUNTER(&pPGM->StatR3PageMapTlbMisses, "/PGM/R3/Page/MapTlbMisses", "TLB misses."); 1610 1610 PGM_REG_COUNTER(&pPGM->StatPageMapTlbFlushes, "/PGM/R3/Page/MapTlbFlushes", "TLB flushes (all contexts)."); 1611 PGM_REG_COUNTER(&pPGM->StatPageMapTlbFlushEntry, "/PGM/R3/Page/MapTlbFlushEntry", "TLB entry flushes (all contexts)."); 1611 1612 1612 1613 PGM_REG_PROFILE(&pPGM->StatRZSyncCR3HandlerVirtualUpdate, "/PGM/RZ/SyncCR3/Handlers/VirtualUpdate", "Profiling of the virtual handler updates."); -
trunk/src/VBox/VMM/PGMInternal.h
r24722 r24723 2778 2778 STAMCOUNTER StatRZPageMapTlbMisses; /**< RC/R0: Ring-3/0 page mapper TLB misses. */ 2779 2779 STAMCOUNTER StatPageMapTlbFlushes; /**< ALL: Ring-3/0 page mapper TLB flushes. */ 2780 STAMCOUNTER StatPageMapTlbFlushEntry; /**< ALL: Ring-3/0 page mapper TLB flushes. */ 2780 2781 STAMCOUNTER StatR3ChunkR3MapTlbHits; /**< R3: Ring-3/0 chunk mapper TLB hits. */ 2781 2782 STAMCOUNTER StatR3ChunkR3MapTlbMisses; /**< R3: Ring-3/0 chunk mapper TLB misses. */ -
trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp
r24715 r24723 192 192 193 193 /** 194 * Invalidates theall page mapping TLBs.194 * Invalidates all page mapping TLBs. 195 195 * 196 196 * @param pVM The VM handle. … … 200 200 pgmLock(pVM); 201 201 STAM_COUNTER_INC(&pVM->pgm.s.StatPageMapTlbFlushes); 202 /* Clear the shared R0/R3 TLB completely. */ 202 203 for (unsigned i = 0; i < RT_ELEMENTS(pVM->pgm.s.PhysTlbHC.aEntries); i++) 203 204 { … … 209 210 /* @todo clear the RC TLB whenever we add it. */ 210 211 pgmUnlock(pVM); 212 } 213 214 /** 215 * Invalidates a page mapping TLB entry 216 * 217 * @param pVM The VM handle. 218 * @param GCPhys GCPhys entry to flush 219 */ 220 VMMDECL(void) PGMPhysInvalidatePageMapTLBEntry(PVM pVM, RTGCPHYS GCPhys) 221 { 222 Assert(PGMIsLocked(pVM)); 223 224 STAM_COUNTER_INC(&pVM->pgm.s.StatPageMapTlbFlushEntry); 225 /* Clear the shared R0/R3 TLB entry. */ 226 #ifdef IN_RC 227 unsigned idx = PGM_PAGER3MAPTLB_IDX(GCPhys); 228 pVM->pgm.s.PhysTlbHC.aEntries[idx].GCPhys = NIL_RTGCPHYS; 229 pVM->pgm.s.PhysTlbHC.aEntries[idx].pPage = 0; 230 pVM->pgm.s.PhysTlbHC.aEntries[idx].pMap = 0; 231 pVM->pgm.s.PhysTlbHC.aEntries[idx].pv = 0; 232 #else 233 PPGMPAGEMAPTLBE pTlbe = &pVM->pgm.s.CTXSUFF(PhysTlb).aEntries[PGM_PAGEMAPTLB_IDX(GCPhys)]; 234 pTlbe->GCPhys = NIL_RTGCPHYS; 235 pTlbe->pPage = 0; 236 pTlbe->pMap = 0; 237 pTlbe->pv = 0; 238 #endif 239 /* @todo clear the RC TLB whenever we add it. */ 211 240 } 212 241 … … 399 428 PGM_PAGE_SET_PAGEID(pPage, pVM->pgm.s.aHandyPages[iHandyPage].idPage); 400 429 PGM_PAGE_SET_STATE(pPage, PGM_PAGE_STATE_ALLOCATED); 401 PGMPhysInvalidatePageMapTLB (pVM);430 PGMPhysInvalidatePageMapTLBEntry(pVM, GCPhys); 402 431 403 432 if ( fFlushTLBs
Note:
See TracChangeset
for help on using the changeset viewer.