Changeset 23283 in vbox
- Timestamp:
- Sep 24, 2009 1:05:02 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 52771
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r23254 r23283 2239 2239 if (pPdeDst->u & PGM_PDFLAGS_TRACK_DIRTY) 2240 2240 { 2241 SHWPDE PdeDst = *pPdeDst; 2242 2241 2243 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_MID_Z(Stat,DirtyPageTrap)); 2242 Assert( pPdeSrc->b.u1Write);2244 Assert(PdeDst.b.u1Write); 2243 2245 2244 2246 /* Note: No need to invalidate this entry on other VCPUs as a stale TLB entry will not harm; write access will simply 2245 2247 * fault again and take this path to only invalidate the entry. 2246 2248 */ 2247 pPdeDst->n.u1Write = 1; 2248 pPdeDst->n.u1Accessed = 1; 2249 pPdeDst->au32[0] &= ~PGM_PDFLAGS_TRACK_DIRTY; 2249 PdeDst.n.u1Write = 1; 2250 PdeDst.n.u1Accessed = 1; 2251 PdeDst.au32[0] &= ~PGM_PDFLAGS_TRACK_DIRTY; 2252 ASMAtomicWriteSize(pPdeDst, PdeDst.u); 2250 2253 PGM_INVL_BIG_PG(pVCpu, GCPtrPage); 2251 2254 STAM_PROFILE_STOP(&pVCpu->pgm.s.CTX_MID_Z(Stat,DirtyBitTracking), a); … … 2369 2372 if (pPteDst->u & PGM_PTFLAGS_TRACK_DIRTY) 2370 2373 { 2371 PPGMPAGE pPage = pgmPhysGetPage(&pVM->pgm.s, pPteSrc->u & GST_PTE_PG_MASK); 2374 PPGMPAGE pPage = pgmPhysGetPage(&pVM->pgm.s, pPteSrc->u & GST_PTE_PG_MASK); 2375 SHWPTE PteDst = *pPteDst; 2372 2376 2373 2377 LogFlow(("DIRTY page trap addr=%RGv\n", GCPtrPage)); 2374 2378 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_MID_Z(Stat,DirtyPageTrap)); 2375 2379 2376 Assert( pPteSrc->n.u1Write);2380 Assert(PteDst.n.u1Write); 2377 2381 2378 2382 /* Note: No need to invalidate this entry on other VCPUs as a stale TLB entry will not harm; write access will simply … … 2383 2387 { 2384 2388 /* Assuming write handlers here as the PTE is present (otherwise we wouldn't be here). */ 2385 pPteDst->n.u1Write = 0;2389 PteDst.n.u1Write = 0; 2386 2390 } 2387 2391 else 2388 pPteDst->n.u1Write = 1; 2389 2390 pPteDst->n.u1Dirty = 1; 2391 pPteDst->n.u1Accessed = 1; 2392 pPteDst->au32[0] &= ~PGM_PTFLAGS_TRACK_DIRTY; 2392 PteDst.n.u1Write = 1; 2393 2394 PteDst.n.u1Dirty = 1; 2395 PteDst.n.u1Accessed = 1; 2396 PteDst.au32[0] &= ~PGM_PTFLAGS_TRACK_DIRTY; 2397 ASMAtomicWriteSize(pPteDst, PteDst.u); 2393 2398 PGM_INVL_PG(pVCpu, GCPtrPage); 2394 2399 -
trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
r23250 r23283 3195 3195 if ((pPT->a[i].u & (X86_PTE_PG_MASK | X86_PTE_P)) == u32) 3196 3196 { 3197 X86PTE Pte; 3198 3197 3199 Log4(("pgmPoolTrackFlushGCPhysPTs: i=%d pte=%RX32 cRefs=%#x\n", i, pPT->a[i], cRefs)); 3198 pPT->a[i].u = (pPT->a[i].u & u32AndMask) | u32OrMask; 3199 if (pPT->a[i].u & PGM_PTFLAGS_TRACK_DIRTY) 3200 pPT->a[i].n.u1Write = 0; /* need to disallow writes when dirty bit tracking is still active. */ 3201 3200 Pte.u = (pPT->a[i].u & u32AndMask) | u32OrMask; 3201 if (Pte.u & PGM_PTFLAGS_TRACK_DIRTY) 3202 Pte.n.u1Write = 0; /* need to disallow writes when dirty bit tracking is still active. */ 3203 3204 ASMAtomicWriteSize(&pPT->a[i].u, Pte.u); 3202 3205 cRefs--; 3203 3206 if (!cRefs) … … 3258 3261 if ((pPT->a[i].u & (X86_PTE_PAE_PG_MASK | X86_PTE_P)) == u64) 3259 3262 { 3263 X86PTEPAE Pte; 3264 3260 3265 Log4(("pgmPoolTrackFlushGCPhysPTs: i=%d pte=%RX64 cRefs=%#x\n", i, pPT->a[i], cRefs)); 3261 pPT->a[i].u = (pPT->a[i].u & u64AndMask) | u64OrMask; 3262 if (pPT->a[i].u & PGM_PTFLAGS_TRACK_DIRTY) 3263 pPT->a[i].n.u1Write = 0; /* need to disallow writes when dirty bit tracking is still active. */ 3264 3266 Pte.u = (pPT->a[i].u & u64AndMask) | u64OrMask; 3267 if (Pte.u & PGM_PTFLAGS_TRACK_DIRTY) 3268 Pte.n.u1Write = 0; /* need to disallow writes when dirty bit tracking is still active. */ 3269 3270 ASMAtomicWriteSize(&pPT->a[i].u, Pte.u); 3265 3271 cRefs--; 3266 3272 if (!cRefs)
Note:
See TracChangeset
for help on using the changeset viewer.