Changeset 36416 in vbox
- Timestamp:
- Mar 24, 2011 6:25:59 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMRZ/PGMRZDynMap.cpp
r35346 r36416 5 5 6 6 /* 7 * Copyright (C) 2008-201 0Oracle Corporation7 * Copyright (C) 2008-2011 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 206 206 /** The number of references. */ 207 207 int32_t volatile cRefs; 208 #ifndef IN_RC 208 209 /** PTE pointer union. */ 209 210 union PGMR0DYNMAPENTRY_PPTE … … 216 217 void *pv; 217 218 } uPte; 219 #else 220 /** PTE pointers. */ 221 struct PGMR0DYNMAPENTRY_PPTE 222 { 223 /** PTE pointer, 32-bit legacy version. */ 224 PX86PTE pLegacy; 225 /** PTE pointer, PAE version. */ 226 PX86PTEPAE pPae; 227 } uPte; 228 #endif 218 229 # ifndef IN_RC 219 230 /** CPUs that haven't invalidated this entry after it's last update. */ … … 248 259 /** The cache size given as a number of pages. */ 249 260 uint32_t cPages; 261 # ifndef IN_RC 250 262 /** Whether it's 32-bit legacy or PAE/AMD64 paging mode. */ 251 263 bool fLegacyMode; 264 # endif 252 265 /** The current load. 253 266 * This does not include guard pages. */ … … 1277 1290 pThis->paPages = RT_ALIGN_PT(pThis + 1, 32, PPGMRZDYNMAPENTRY); 1278 1291 pThis->cPages = cPages; 1279 pThis->fLegacyMode = PGMGetHostMode(pVM) == PGMMODE_32_BIT;1280 1292 pThis->cLoad = 0; 1281 1293 pThis->cMaxLoad = 0; … … 1288 1300 pThis->paPages[iPage].pvPage = pVM->pgm.s.pbDynPageMapBaseGC + iPage * PAGE_SIZE; 1289 1301 pThis->paPages[iPage].cRefs = 0; 1290 if (pThis->fLegacyMode) 1291 pThis->paPages[iPage].uPte.pLegacy = &pVM->pgm.s.paDynPageMap32BitPTEsGC[iPage]; 1292 else 1293 pThis->paPages[iPage].uPte.pPae = (PX86PTEPAE)&pVM->pgm.s.paDynPageMapPaePTEsGC[iPage]; 1302 pThis->paPages[iPage].uPte.pLegacy = &pVM->pgm.s.paDynPageMap32BitPTEsGC[iPage]; 1303 pThis->paPages[iPage].uPte.pPae = (PX86PTEPAE)&pVM->pgm.s.paDynPageMapPaePTEsGC[iPage]; 1294 1304 } 1295 1305 … … 1422 1432 #ifndef IN_RC 1423 1433 RTCpuSetFill(&paPages[iFreePage].PendingSet); 1424 #endif 1434 1425 1435 if (pThis->fLegacyMode) 1436 #endif 1426 1437 { 1427 1438 X86PGUINT uOld = paPages[iFreePage].uPte.pLegacy->u; … … 1434 1445 Assert(paPages[iFreePage].uPte.pLegacy->u == uNew); 1435 1446 } 1447 #ifndef IN_RC 1436 1448 else 1449 #endif 1437 1450 { 1438 1451 X86PGPAEUINT uOld = paPages[iFreePage].uPte.pPae->u;
Note:
See TracChangeset
for help on using the changeset viewer.