VirtualBox

Changeset 17345 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Mar 4, 2009 2:24:56 PM (16 years ago)
Author:
vboxsync
Message:

Fixed out of sync GC cache due to locked entries.

File:
1 edited

Legend:

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

    r17316 r17345  
    22492249        {
    22502250            int iPage = au8Trans[pVM->pgm.s.iDynPageMapLast][iCache];
    2251             void *pv = pVM->pgm.s.pbDynPageMapBaseGC + (iPage << PAGE_SHIFT);
    2252             *ppv = pv;
    2253             STAM_COUNTER_INC(&pVM->pgm.s.StatRCDynMapCacheHits);
    2254             Log4(("PGMGCDynMapHCPage: HCPhys=%RHp pv=%p iPage=%d iCache=%d\n", HCPhys, pv, iPage, iCache));
    2255             return VINF_SUCCESS;
     2251
     2252            /* The cache can get out of sync with locked entries. (10 locked, 2 overwrites its cache position, last = 11, lookup 2 -> page 10 instead of 2) */
     2253            if ((pVM->pgm.s.paDynPageMap32BitPTEsGC[iPage].u & X86_PTE_PG_MASK) == HCPhys)
     2254            {
     2255                void *pv = pVM->pgm.s.pbDynPageMapBaseGC + (iPage << PAGE_SHIFT);
     2256                *ppv = pv;
     2257                STAM_COUNTER_INC(&pVM->pgm.s.StatRCDynMapCacheHits);
     2258                Log4(("PGMGCDynMapHCPage: HCPhys=%RHp pv=%p iPage=%d iCache=%d\n", HCPhys, pv, iPage, iCache));
     2259                return VINF_SUCCESS;
     2260            }
    22562261        }
    22572262    }
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