- Timestamp:
- Feb 24, 2009 9:52:53 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/param.h
r14645 r17048 58 58 * This must be a power of 2 number of pages! 59 59 */ 60 #define MM_HYPER_DYNAMIC_SIZE ( 8* PAGE_SIZE)60 #define MM_HYPER_DYNAMIC_SIZE (16 * PAGE_SIZE) 61 61 62 62 /** @} */ -
trunk/src/VBox/VMM/VMMAll/PGMAll.cpp
r17030 r17048 2150 2150 */ 2151 2151 register unsigned iCache; 2152 if ( pVM->pgm.s.aHCPhysDynPageMapCache[iCache = 0] == HCPhys 2153 || pVM->pgm.s.aHCPhysDynPageMapCache[iCache = 1] == HCPhys 2154 || pVM->pgm.s.aHCPhysDynPageMapCache[iCache = 2] == HCPhys 2155 || pVM->pgm.s.aHCPhysDynPageMapCache[iCache = 3] == HCPhys) 2152 for (iCache = 0;iCache < RT_ELEMENTS(pVM->pgm.s.aHCPhysDynPageMapCache);iCache++) 2156 2153 { 2157 2154 static const uint8_t au8Trans[MM_HYPER_DYNAMIC_SIZE >> PAGE_SHIFT][RT_ELEMENTS(pVM->pgm.s.aHCPhysDynPageMapCache)] = 2158 2155 { 2159 { 0, 5, 6, 7 }, 2160 { 0, 1, 6, 7 }, 2161 { 0, 1, 2, 7 }, 2162 { 0, 1, 2, 3 }, 2163 { 4, 1, 2, 3 }, 2164 { 4, 5, 2, 3 }, 2165 { 4, 5, 6, 3 }, 2166 { 4, 5, 6, 7 }, 2156 { 0, 9, 10, 11, 12, 13, 14, 15}, 2157 { 0, 1, 10, 11, 12, 13, 14, 15}, 2158 { 0, 1, 2, 11, 12, 13, 14, 15}, 2159 { 0, 1, 2, 3, 12, 13, 14, 15}, 2160 { 0, 1, 2, 3, 4, 13, 14, 15}, 2161 { 0, 1, 2, 3, 4, 5, 14, 15}, 2162 { 0, 1, 2, 3, 4, 5, 6, 15}, 2163 { 0, 1, 2, 3, 4, 5, 6, 7}, 2164 { 8, 1, 2, 3, 4, 5, 6, 7}, 2165 { 8, 9, 2, 3, 4, 5, 6, 7}, 2166 { 8, 9, 10, 3, 4, 5, 6, 7}, 2167 { 8, 9, 10, 11, 4, 5, 6, 7}, 2168 { 8, 9, 10, 11, 12, 5, 6, 7}, 2169 { 8, 9, 10, 11, 12, 13, 6, 7}, 2170 { 8, 9, 10, 11, 12, 13, 14, 7}, 2171 { 8, 9, 10, 11, 12, 13, 14, 15}, 2167 2172 }; 2168 AssertCompile(RT_ELEMENTS(au8Trans) == 8); 2169 AssertCompile(RT_ELEMENTS(au8Trans[0]) == 4); 2170 int iPage = au8Trans[pVM->pgm.s.iDynPageMapLast][iCache]; 2171 void *pv = pVM->pgm.s.pbDynPageMapBaseGC + (iPage << PAGE_SHIFT); 2172 *ppv = pv; 2173 STAM_COUNTER_INC(&pVM->pgm.s.StatRCDynMapCacheHits); 2174 //Log(("PGMGCDynMapHCPage: HCPhys=%RHp pv=%p iPage=%d iCache=%d\n", HCPhys, pv, iPage, iCache)); 2175 return VINF_SUCCESS; 2176 } 2177 Assert(RT_ELEMENTS(pVM->pgm.s.aHCPhysDynPageMapCache) == 4); 2173 AssertCompile(RT_ELEMENTS(au8Trans) == 16); 2174 AssertCompile(RT_ELEMENTS(au8Trans[0]) == 8); 2175 2176 if (pVM->pgm.s.aHCPhysDynPageMapCache[iCache] == HCPhys) 2177 { 2178 int iPage = au8Trans[pVM->pgm.s.iDynPageMapLast][iCache]; 2179 void *pv = pVM->pgm.s.pbDynPageMapBaseGC + (iPage << PAGE_SHIFT); 2180 *ppv = pv; 2181 STAM_COUNTER_INC(&pVM->pgm.s.StatRCDynMapCacheHits); 2182 Log4(("PGMGCDynMapHCPage: HCPhys=%RHp pv=%p iPage=%d iCache=%d\n", HCPhys, pv, iPage, iCache)); 2183 return VINF_SUCCESS; 2184 } 2185 } 2186 AssertCompile(RT_ELEMENTS(pVM->pgm.s.aHCPhysDynPageMapCache) == 8); 2178 2187 STAM_COUNTER_INC(&pVM->pgm.s.StatRCDynMapCacheMisses); 2179 2188 … … 2183 2192 register unsigned iPage = pVM->pgm.s.iDynPageMapLast; 2184 2193 pVM->pgm.s.iDynPageMapLast = iPage = (iPage + 1) & ((MM_HYPER_DYNAMIC_SIZE >> PAGE_SHIFT) - 1); 2185 Assert((MM_HYPER_DYNAMIC_SIZE >> PAGE_SHIFT) == 8);2194 Assert((MM_HYPER_DYNAMIC_SIZE >> PAGE_SHIFT) == 16); 2186 2195 2187 2196 pVM->pgm.s.aHCPhysDynPageMapCache[iPage & (RT_ELEMENTS(pVM->pgm.s.aHCPhysDynPageMapCache) - 1)] = HCPhys; -
trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
r17000 r17048 2404 2404 int pgmPoolSyncCR3(PVM pVM) 2405 2405 { 2406 LogFlow(("pgmPoolSyncCR3\n")); 2406 2407 /* 2407 2408 * When monitoring shadowed pages, we reset the modification counters on CR3 sync.
Note:
See TracChangeset
for help on using the changeset viewer.