Changeset 4977 in vbox
- Timestamp:
- Sep 22, 2007 12:01:15 AM (17 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGMHandler.cpp
r4917 r4977 180 180 { 181 181 PPGMPHYSHANDLER pCur = (PPGMPHYSHANDLER)pNode; 182 unsigned fFlags = pgmHandlerPhysicalCalcFlags( (PVM)pvUser,pCur);182 unsigned fFlags = pgmHandlerPhysicalCalcFlags(pCur); 183 183 PPGMRAMRANGE pRamHint = NULL; 184 184 RTGCPHYS GCPhys = pCur->Core.Key; … … 434 434 for (unsigned iPage = 0; iPage < pCur->cPages; iPage++) 435 435 if (pCur->aPhysToVirt[iPage].offNextAlias & PGMPHYS2VIRTHANDLER_IN_TREE) 436 pgmHandlerVirtualClearPage(p VM, pPGM, pCur, iPage);436 pgmHandlerVirtualClearPage(pPGM, pCur, iPage); 437 437 438 438 /* -
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r4917 r4977 2673 2673 if (PdeDst.n.u1Present) 2674 2674 { 2675 PPGMPOOLPAGE pShwPage = pgmPoolGetPage(p VM, pPool, PdeDst.u & SHW_PDE_PG_MASK);2675 PPGMPOOLPAGE pShwPage = pgmPoolGetPage(pPool, PdeDst.u & SHW_PDE_PG_MASK); 2676 2676 RTGCPHYS GCPhys; 2677 2677 if ( !PdeSrc.b.u1Size … … 2753 2753 if (pPDEDst->n.u1Present) 2754 2754 { 2755 pgmPoolFreeByPage(pPool, pgmPoolGetPage(p VM, pPool, pPDEDst->u & SHW_PDE_PG_MASK), SHW_POOL_ROOT_IDX, iPdShw);2755 pgmPoolFreeByPage(pPool, pgmPoolGetPage(pPool, pPDEDst->u & SHW_PDE_PG_MASK), SHW_POOL_ROOT_IDX, iPdShw); 2756 2756 pPDEDst->u = 0; 2757 2757 MY_STAM_COUNTER_INC(&pVM->pgm.s.CTXMID(Stat,SyncCR3DstFreedSrcNP)); -
trunk/src/VBox/VMM/VMMAll/PGMAllGst.h
r4917 r4977 609 609 PPGMVIRTHANDLER pCur = (PPGMVIRTHANDLER)pNode; 610 610 PPGMHVUSTATE pState = (PPGMHVUSTATE)pvUser; 611 PVM pVM = pState->pVM;612 611 613 612 #if PGM_GST_TYPE == PGM_TYPE_32BIT 614 PX86PD pPDSrc = p VM->pgm.s.CTXSUFF(pGuestPD);613 PX86PD pPDSrc = pState->pVM->pgm.s.CTXSUFF(pGuestPD); 615 614 #endif 616 615 … … 668 667 { 669 668 if (pCur->aPhysToVirt[iPage].Core.Key != NIL_RTGCPHYS) 670 pgmHandlerVirtualClearPage( pState->pVM,&pState->pVM->pgm.s, pCur, iPage);669 pgmHandlerVirtualClearPage(&pState->pVM->pgm.s, pCur, iPage); 671 670 #ifdef VBOX_STRICT_PGM_HANDLER_VIRTUAL 672 671 AssertReleaseMsg(!pCur->aPhysToVirt[iPage].offNextAlias, … … 691 690 if (pCur->aPhysToVirt[iPage].Core.Key != NIL_RTGCPHYS) 692 691 { 693 pgmHandlerVirtualClearPage( pState->pVM,&pState->pVM->pgm.s, pCur, iPage);692 pgmHandlerVirtualClearPage(&pState->pVM->pgm.s, pCur, iPage); 694 693 #ifdef VBOX_STRICT_PGM_HANDLER_VIRTUAL 695 694 AssertReleaseMsg(!pCur->aPhysToVirt[iPage].offNextAlias, … … 718 717 { 719 718 if (pCur->aPhysToVirt[iPage].Core.Key != NIL_RTGCPHYS) 720 pgmHandlerVirtualClearPage( pState->pVM,&pState->pVM->pgm.s, pCur, iPage);719 pgmHandlerVirtualClearPage(&pState->pVM->pgm.s, pCur, iPage); 721 720 #ifdef VBOX_STRICT_PGM_HANDLER_VIRTUAL 722 721 AssertReleaseMsg(!pCur->aPhysToVirt[iPage].offNextAlias, … … 740 739 if (pCur->aPhysToVirt[iPage].Core.Key != NIL_RTGCPHYS) 741 740 { 742 pgmHandlerVirtualClearPage( pState->pVM,&pState->pVM->pgm.s, pCur, iPage);741 pgmHandlerVirtualClearPage(&pState->pVM->pgm.s, pCur, iPage); 743 742 pCur->aPhysToVirt[iPage].Core.Key = NIL_RTGCPHYS; 744 743 pState->fTodo |= PGM_SYNC_UPDATE_PAGE_BIT_VIRTUAL; -
trunk/src/VBox/VMM/VMMAll/PGMAllHandler.cpp
r4953 r4977 233 233 const int rc = VINF_PGM_GCPHYS_ALIASED; 234 234 #endif 235 const unsigned fFlags = pgmHandlerPhysicalCalcFlags(p VM, pCur); Assert(!(fFlags & X86_PTE_PAE_PG_MASK));235 const unsigned fFlags = pgmHandlerPhysicalCalcFlags(pCur); Assert(!(fFlags & X86_PTE_PAE_PG_MASK)); 236 236 RTUINT cPages = pCur->cPages; 237 237 RTUINT i = (pCur->Core.Key - pRam->GCPhys) >> PAGE_SHIFT; … … 377 377 * Tell REM. 378 378 */ 379 const bool fRestoreAsRAM = pCur->pfnHandlerR3 379 const bool fRestoreAsRAM = pCur->pfnHandlerR3 380 380 && pCur->enmType != PGMPHYSHANDLERTYPE_MMIO; /** @todo this isn't entirely correct. */ 381 381 #ifndef IN_RING3 … … 432 432 || (pBelow->Core.KeyLast >> PAGE_SHIFT) != (pCur->Core.Key >> PAGE_SHIFT)) 433 433 break; 434 pgmRamFlagsSetByGCPhysWithHint(pPGM, GCPhys, pgmHandlerPhysicalCalcFlags(p VM, pCur), &pRamHint);434 pgmRamFlagsSetByGCPhysWithHint(pPGM, GCPhys, pgmHandlerPhysicalCalcFlags(pCur), &pRamHint); 435 435 436 436 /* next? */ … … 454 454 || (pAbove->Core.Key >> PAGE_SHIFT) != (pCur->Core.KeyLast >> PAGE_SHIFT)) 455 455 break; 456 pgmRamFlagsSetByGCPhysWithHint(pPGM, GCPhys, pgmHandlerPhysicalCalcFlags(p VM, pCur), &pRamHint);456 pgmRamFlagsSetByGCPhysWithHint(pPGM, GCPhys, pgmHandlerPhysicalCalcFlags(pCur), &pRamHint); 457 457 458 458 /* next? */ -
trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
r4917 r4977 43 43 static void pgmPoolFlushAllInt(PPGMPOOL pPool); 44 44 #ifdef PGMPOOL_WITH_USER_TRACKING 45 DECLINLINE(unsigned) pgmPoolTrackGetShadowEntrySize(P VM pVM, PGMPOOLKIND enmKind);46 DECLINLINE(unsigned) pgmPoolTrackGetGuestEntrySize(P VM pVM, PGMPOOLKIND enmKind);45 DECLINLINE(unsigned) pgmPoolTrackGetShadowEntrySize(PGMPOOLKIND enmKind); 46 DECLINLINE(unsigned) pgmPoolTrackGetGuestEntrySize(PGMPOOLKIND enmKind); 47 47 static void pgmPoolTrackDeref(PPGMPOOL pPool, PPGMPOOLPAGE pPage); 48 48 #endif … … 186 186 /** 187 187 * Wrapper for getting the current context pointer to the entry being modified. 188 * 188 * 189 189 * @returns Pointer to the current context mapping of the entry. 190 190 * @param pPool The pool. … … 203 203 204 204 #elif defined(IN_RING0) 205 PVM pVM = pPool->CTXSUFF(pVM);206 205 void *pvRet; 207 208 206 int rc = pgmRamGCPhys2HCPtr(&pPool->pVMHC->pgm.s, GCPhysFault & ~(RTGCPHYS)(cbEntry - 1), &pvRet); 209 207 AssertFatalRCSuccess(rc); … … 238 236 #endif 239 237 { 240 const PVM pVM = pPool->CTXSUFF(pVM);241 242 238 Assert(pPage->iMonitoredPrev == NIL_PGMPOOL_IDX); 243 239 const unsigned off = GCPhysFault & PAGE_OFFSET_MASK; … … 252 248 PX86PDPAE pPDPae; 253 249 } uShw; 254 uShw.pv = PGMPOOL_PAGE_2_PTR(p VM, pPage);250 uShw.pv = PGMPOOL_PAGE_2_PTR(pPool->CTXSUFF(pVM), pPage); 255 251 256 252 switch (pPage->enmKind) … … 314 310 if (uShw.pPD->a[iShw].u & PGM_PDFLAGS_MAPPING) 315 311 { 316 Assert(pgmMapAreMappingsEnabled(&p VM->pgm.s));317 VM_FF_SET(p VM, VM_FF_PGM_SYNC_CR3);312 Assert(pgmMapAreMappingsEnabled(&pPool->CTXSUFF(pVM)->pgm.s)); 313 VM_FF_SET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3); 318 314 LogFlow(("pgmPoolMonitorChainChanging: Detected conflict at iShw=%#x!\n", iShw)); 319 315 } … … 328 324 && uShw.pPD->a[iShw2].u & PGM_PDFLAGS_MAPPING) 329 325 { 330 Assert(pgmMapAreMappingsEnabled(&p VM->pgm.s));331 VM_FF_SET(p VM, VM_FF_PGM_SYNC_CR3);326 Assert(pgmMapAreMappingsEnabled(&pPool->CTXSUFF(pVM)->pgm.s)); 327 VM_FF_SET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3); 332 328 LogFlow(("pgmPoolMonitorChainChanging: Detected conflict at iShw2=%#x!\n", iShw2)); 333 329 } … … 335 331 #if 0 /* useful when running PGMAssertCR3(), a bit too troublesome for general use (TLBs). */ 336 332 if ( uShw.pPD->a[iShw].n.u1Present 337 && !VM_FF_ISSET(p VM, VM_FF_PGM_SYNC_CR3))333 && !VM_FF_ISSET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3)) 338 334 { 339 335 LogFlow(("pgmPoolMonitorChainChanging: iShw=%#x: %RX32 -> freeing it!\n", iShw, uShw.pPD->a[iShw].u)); … … 341 337 ASMProbeReadByte(pvAddress); 342 338 # endif 343 pgmPoolFree(p VM, uShw.pPD->a[iShw].u & X86_PDE_PG_MASK, pPage->idx, iShw);339 pgmPoolFree(pPool->CTXSUFF(pVM), uShw.pPD->a[iShw].u & X86_PDE_PG_MASK, pPage->idx, iShw); 344 340 uShw.pPD->a[iShw].u = 0; 345 341 } … … 355 351 if ((uShw.pPDPae->a[iShw].u & (PGM_PDFLAGS_MAPPING | X86_PDE_P)) == (PGM_PDFLAGS_MAPPING | X86_PDE_P)) 356 352 { 357 Assert(pgmMapAreMappingsEnabled(&p VM->pgm.s));358 VM_FF_SET(p VM, VM_FF_PGM_SYNC_CR3);353 Assert(pgmMapAreMappingsEnabled(&pPool->CTXSUFF(pVM)->pgm.s)); 354 VM_FF_SET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3); 359 355 LogFlow(("pgmPoolMonitorChainChanging: Detected conflict at iShw=%#x!\n", iShw)); 360 356 } … … 368 364 && (uShw.pPDPae->a[iShw2].u & (PGM_PDFLAGS_MAPPING | X86_PDE_P)) == (PGM_PDFLAGS_MAPPING | X86_PDE_P)) 369 365 { 370 Assert(pgmMapAreMappingsEnabled(&p VM->pgm.s));371 VM_FF_SET(p VM, VM_FF_PGM_SYNC_CR3);366 Assert(pgmMapAreMappingsEnabled(&pPool->CTXSUFF(pVM)->pgm.s)); 367 VM_FF_SET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3); 372 368 LogFlow(("pgmPoolMonitorChainChanging: Detected conflict at iShw2=%#x!\n", iShw2)); 373 369 } … … 375 371 #if 0 /* useful when running PGMAssertCR3(), a bit too troublesome for general use (TLBs). */ 376 372 if ( uShw.pPDPae->a[iShw].n.u1Present 377 && !VM_FF_ISSET(p VM, VM_FF_PGM_SYNC_CR3))373 && !VM_FF_ISSET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3)) 378 374 { 379 375 LogFlow(("pgmPoolMonitorChainChanging: iShw=%#x: %RX64 -> freeing it!\n", iShw, uShw.pPDPae->a[iShw].u)); … … 381 377 ASMProbeReadByte(pvAddress); 382 378 # endif 383 pgmPoolFree(p VM, uShw.pPDPae->a[iShw].u & X86_PDE_PAE_PG_MASK, pPage->idx, iShw);379 pgmPoolFree(pPool->CTXSUFF(pVM), uShw.pPDPae->a[iShw].u & X86_PDE_PAE_PG_MASK, pPage->idx, iShw); 384 380 uShw.pPDPae->a[iShw].u = 0; 385 381 } … … 785 781 DECLINLINE(void) pgmPoolHashRemove(PPGMPOOL pPool, PPGMPOOLPAGE pPage) 786 782 { 787 const PVM pVM = pPool->CTXSUFF(pVM);788 789 783 uint16_t iHash = PGMPOOL_HASH(pPage->GCPhys); 790 784 if (pPool->aiHash[iHash] == pPage->idx) … … 824 818 static int pgmPoolCacheFreeOne(PPGMPOOL pPool, uint16_t iUser) 825 819 { 826 const PVM pVM = pPool->CTXSUFF(pVM);827 828 820 Assert(pPool->iAgeHead != pPool->iAgeTail); /* We shouldn't be here if there < 2 cached entries! */ 829 821 STAM_COUNTER_INC(&pPool->StatCacheFreeUpOne); … … 864 856 * @returns true if reused and the cached page (enmKind1) should be flushed 865 857 * @returns false if not reused. 866 * @param pVM The VM handle.867 858 * @param enmKind1 The kind of the cached page. 868 859 * @param enmKind2 The kind of the requested page. 869 860 */ 870 static bool pgmPoolCacheReusedByKind(P VM pVM, PGMPOOLKIND enmKind1, PGMPOOLKIND enmKind2)861 static bool pgmPoolCacheReusedByKind(PGMPOOLKIND enmKind1, PGMPOOLKIND enmKind2) 871 862 { 872 863 switch (enmKind1) … … 951 942 static int pgmPoolCacheAlloc(PPGMPOOL pPool, RTGCPHYS GCPhys, PGMPOOLKIND enmKind, uint16_t iUser, uint16_t iUserTable, PPPGMPOOLPAGE ppPage) 952 943 { 953 const PVM pVM = pPool->CTXSUFF(pVM);954 955 944 /* 956 945 * Look up the GCPhys in the hash. … … 982 971 * different way than the other kinds. 983 972 */ 984 if (pgmPoolCacheReusedByKind( pVM,(PGMPOOLKIND)pPage->enmKind, enmKind))973 if (pgmPoolCacheReusedByKind((PGMPOOLKIND)pPage->enmKind, enmKind)) 985 974 { 986 975 STAM_COUNTER_INC(&pPool->StatCacheKindMismatches); … … 1091 1080 { 1092 1081 #ifdef PGMPOOL_WITH_CACHE 1093 const PVM pVM = pPool->CTXSUFF(pVM);1094 1095 1082 /* 1096 1083 * Look up the GCPhys in the hash. … … 1158 1145 static int pgmPoolMonitorInsert(PPGMPOOL pPool, PPGMPOOLPAGE pPage) 1159 1146 { 1160 const PVM pVM = pPool->CTXSUFF(pVM);1161 1162 1147 /* 1163 1148 * Filter out the relevant kinds. … … 1211 1196 { 1212 1197 Assert(pPage->iMonitoredNext == NIL_PGMPOOL_IDX); Assert(pPage->iMonitoredPrev == NIL_PGMPOOL_IDX); 1198 PVM pVM = pPool->CTXSUFF(pVM); 1213 1199 const RTGCPHYS GCPhysPage = pPage->GCPhys & ~(RTGCPHYS)(PAGE_SIZE - 1); 1214 1200 rc = PGMHandlerPhysicalRegisterEx(pVM, PGMPHYSHANDLERTYPE_PHYSICAL_WRITE, … … 1240 1226 static int pgmPoolMonitorFlush(PPGMPOOL pPool, PPGMPOOLPAGE pPage) 1241 1227 { 1242 const PVM pVM = pPool->CTXSUFF(pVM);1243 1244 1228 /* 1245 1229 * Filter out the relevant kinds. … … 1277 1261 * Remove the page from the monitored list or uninstall it if last. 1278 1262 */ 1263 const PVM pVM = pPool->CTXSUFF(pVM); 1279 1264 int rc; 1280 1265 if ( pPage->iMonitoredNext != NIL_PGMPOOL_IDX … … 1369 1354 int pgmPoolMonitorMonitorCR3(PPGMPOOL pPool, uint16_t idxRoot, RTGCPHYS GCPhysCR3) 1370 1355 { 1371 const PVM pVM = pPool->CTXSUFF(pVM);1372 1373 1356 Assert(idxRoot != NIL_PGMPOOL_IDX && idxRoot < PGMPOOL_IDX_FIRST); 1374 1357 PPGMPOOLPAGE pPage = &pPool->aPages[idxRoot]; … … 1426 1409 int pgmPoolMonitorUnmonitorCR3(PPGMPOOL pPool, uint16_t idxRoot) 1427 1410 { 1428 const PVM pVM = pPool->CTXSUFF(pVM);1429 1430 1411 Assert(idxRoot != NIL_PGMPOOL_IDX && idxRoot < PGMPOOL_IDX_FIRST); 1431 1412 PPGMPOOLPAGE pPage = &pPool->aPages[idxRoot]; … … 1870 1851 static void pgmPoolTrackFreeUser(PPGMPOOL pPool, PPGMPOOLPAGE pPage, uint16_t iUser, uint16_t iUserTable) 1871 1852 { 1872 const PVM pVM = pPool->CTXSUFF(pVM);1873 1874 1853 /* 1875 1854 * Unlink and free the specified user entry. … … 1921 1900 * Gets the entry size of a shadow table. 1922 1901 * 1923 * @param pVM The VM handle.1924 1902 * @param enmKind The kind of page. 1925 1903 * … … 1928 1906 * returned. 1929 1907 */ 1930 DECLINLINE(unsigned) pgmPoolTrackGetShadowEntrySize(P VM pVM, PGMPOOLKIND enmKind)1908 DECLINLINE(unsigned) pgmPoolTrackGetShadowEntrySize(PGMPOOLKIND enmKind) 1931 1909 { 1932 1910 switch (enmKind) … … 1960 1938 * Gets the entry size of a guest table. 1961 1939 * 1962 * @param pVM The VM handle.1963 1940 * @param enmKind The kind of page. 1964 1941 * … … 1967 1944 * returned. 1968 1945 */ 1969 DECLINLINE(unsigned) pgmPoolTrackGetGuestEntrySize(P VM pVM, PGMPOOLKIND enmKind)1946 DECLINLINE(unsigned) pgmPoolTrackGetGuestEntrySize(PGMPOOLKIND enmKind) 1970 1947 { 1971 1948 switch (enmKind) … … 2112 2089 * 2113 2090 * @param pVM The VM handle. 2114 * @param pPhysPage The guest page in question. 2091 * @param pPhysPage The guest page in question. 2115 2092 * @param iPhysExt The physical cross reference extent list to flush. 2116 2093 */ … … 2160 2137 * 2161 2138 * @param pVM The VM handle. 2162 * @param pPhysPage The guest page in question. 2139 * @param pPhysPage The guest page in question. 2163 2140 */ 2164 2141 int pgmPoolTrackFlushGCPhysPTsSlow(PVM pVM, PPGMPAGE pPhysPage) … … 2185 2162 * This is simple but not quite optimal solution. 2186 2163 */ 2187 const uint64_t u64 = PGM_PAGE_GET_HCPHYS(pPhysPage) | X86_PTE_P; 2164 const uint64_t u64 = PGM_PAGE_GET_HCPHYS(pPhysPage) | X86_PTE_P; 2188 2165 const uint32_t u32 = u64; 2189 2166 unsigned cLeft = pPool->cUsedPages; … … 2271 2248 uint32_t *pau32; 2272 2249 } u; 2273 const PVM pVM = pPool->CTXSUFF(pVM); 2274 2275 u.pau64 = (uint64_t *)PGMPOOL_PAGE_2_PTR(pVM, pUserPage); 2250 u.pau64 = (uint64_t *)PGMPOOL_PAGE_2_PTR(pPool->CTXSUFF(pVM), pUserPage); 2276 2251 2277 2252 #ifdef VBOX_STRICT … … 2547 2522 { 2548 2523 const unsigned cRefs = pPhysPage->HCPhys >> MM_RAM_FLAGS_CREFS_SHIFT; /** @todo PAGE FLAGS */ 2549 const PVM pVM = pPool->CTXSUFF(pVM);2550 2551 2524 AssertFatalMsg(cRefs == MM_RAM_FLAGS_CREFS_PHYSEXT, ("cRefs=%d HCPhys=%RHp pPage=%p:{.idx=%d}\n", cRefs, pPhysPage->HCPhys, pPage, pPage->idx)); 2552 2525 … … 2577 2550 2578 2551 /* we can free the node. */ 2552 PVM pVM = pPool->CTXSUFF(pVM); 2579 2553 const uint16_t iPhysExtNext = paPhysExts[iPhysExt].iNext; 2580 2554 if ( iPhysExtPrev == NIL_PGMPOOL_PHYSEXT_INDEX … … 2634 2608 static void pgmPoolTracDerefGCPhys(PPGMPOOL pPool, PPGMPOOLPAGE pPage, RTHCPHYS HCPhys, RTGCPHYS GCPhys) 2635 2609 { 2636 const PVM pVM = pPool->CTXSUFF(pVM);2637 2610 /* 2638 2611 * Walk range list. 2639 2612 */ 2640 PPGMRAMRANGE pRam = p VM->pgm.s.CTXSUFF(pRamRanges);2613 PPGMRAMRANGE pRam = pPool->CTXSUFF(pVM)->pgm.s.CTXSUFF(pRamRanges); 2641 2614 while (pRam) 2642 2615 { … … 2670 2643 static void pgmPoolTracDerefGCPhysHint(PPGMPOOL pPool, PPGMPOOLPAGE pPage, RTHCPHYS HCPhys, RTGCPHYS GCPhysHint) 2671 2644 { 2672 const PVM pVM = pPool->CTXSUFF(pVM);2673 2645 /* 2674 2646 * Walk range list. 2675 2647 */ 2676 PPGMRAMRANGE pRam = p VM->pgm.s.CTXSUFF(pRamRanges);2648 PPGMRAMRANGE pRam = pPool->CTXSUFF(pVM)->pgm.s.CTXSUFF(pRamRanges); 2677 2649 while (pRam) 2678 2650 { … … 2697 2669 */ 2698 2670 STAM_COUNTER_INC(&pPool->StatTrackLinearRamSearches); 2699 pRam = p VM->pgm.s.CTXSUFF(pRamRanges);2671 pRam = pPool->CTXSUFF(pVM)->pgm.s.CTXSUFF(pRamRanges); 2700 2672 while (pRam) 2701 2673 { … … 2830 2802 DECLINLINE(void) pgmPoolTrackDerefPDPae(PPGMPOOL pPool, PPGMPOOLPAGE pPage, PX86PDPAE pShwPD) 2831 2803 { 2832 const PVM pVM = pPool->CTXSUFF(pVM);2833 2834 2804 for (unsigned i = 0; i < ELEMENTS(pShwPD->a); i++) 2835 2805 { … … 2856 2826 DECLINLINE(void) pgmPoolTrackDerefPDPTR64Bit(PPGMPOOL pPool, PPGMPOOLPAGE pPage, PX86PDPTR pShwPdPtr) 2857 2827 { 2858 const PVM pVM = pPool->CTXSUFF(pVM);2859 2860 2828 for (unsigned i = 0; i < ELEMENTS(pShwPdPtr->a); i++) 2861 2829 { … … 2883 2851 static void pgmPoolTrackDeref(PPGMPOOL pPool, PPGMPOOLPAGE pPage) 2884 2852 { 2885 const PVM pVM = pPool->CTXSUFF(pVM);2886 2887 2853 /* 2888 2854 * Map the shadow page and take action according to the page kind. … … 3175 3141 if (pPage->fMonitored) 3176 3142 { 3177 constPVM pVM = pPool->CTXSUFF(pVM);3143 PVM pVM = pPool->CTXSUFF(pVM); 3178 3144 int rc = PGMHandlerPhysicalChangeCallbacks(pVM, pPage->GCPhys & ~(RTGCPHYS)(PAGE_SIZE - 1), 3179 3145 pPool->pfnAccessHandlerR3, MMHyperCCToR3(pVM, pPage), … … 3495 3461 LogFlow(("pgmPoolFree: HCPhys=%VHp iUser=%#x iUserTable=%#x\n", HCPhys, iUser, iUserTable)); 3496 3462 PPGMPOOL pPool = pVM->pgm.s.CTXSUFF(pPool); 3497 pgmPoolFreeByPage(pPool, pgmPoolGetPage(p VM, pPool, HCPhys), iUser, iUserTable);3463 pgmPoolFreeByPage(pPool, pgmPoolGetPage(pPool, HCPhys), iUser, iUserTable); 3498 3464 } 3499 3465 … … 3511 3477 /** @todo profile this! */ 3512 3478 PPGMPOOL pPool = pVM->pgm.s.CTXSUFF(pPool); 3513 PPGMPOOLPAGE pPage = pgmPoolGetPage(p VM, pPool, HCPhys);3479 PPGMPOOLPAGE pPage = pgmPoolGetPage(pPool, HCPhys); 3514 3480 Log3(("pgmPoolGetPageByHCPhys: HCPhys=%VHp -> %p:{.idx=%d .GCPhys=%VGp .enmKind=%d}\n", 3515 3481 HCPhys, pPage, pPage->idx, pPage->GCPhys, pPage->enmKind)); -
trunk/src/VBox/VMM/VMMAll/TMAll.cpp
r4917 r4977 157 157 const uint64_t u64Now = TMVirtualGet(pVM); 158 158 159 /* 159 /* 160 160 * TMCLOCK_VIRTUAL 161 161 */ … … 173 173 } 174 174 175 /* 175 /* 176 176 * TMCLOCK_VIRTUAL_SYNC 177 * This isn't quite as stright forward if in a catch-up, not only do 177 * This isn't quite as stright forward if in a catch-up, not only do 178 178 * we have to adjust the 'now' but when have to adjust the delta as well. 179 179 */ … … 696 696 TMDECL(uint64_t) TMTimerToNano(PTMTIMER pTimer, uint64_t u64Ticks) 697 697 { 698 PVM pVM = pTimer->CTXALLSUFF(pVM); NOREF(pVM);699 700 698 switch (pTimer->enmClock) 701 699 { … … 731 729 TMDECL(uint64_t) TMTimerToMicro(PTMTIMER pTimer, uint64_t u64Ticks) 732 730 { 733 PVM pVM = pTimer->CTXALLSUFF(pVM); NOREF(pVM);734 735 731 switch (pTimer->enmClock) 736 732 { … … 766 762 TMDECL(uint64_t) TMTimerToMilli(PTMTIMER pTimer, uint64_t u64Ticks) 767 763 { 768 PVM pVM = pTimer->CTXALLSUFF(pVM); NOREF(pVM);769 770 764 switch (pTimer->enmClock) 771 765 { … … 800 794 TMDECL(uint64_t) TMTimerFromNano(PTMTIMER pTimer, uint64_t u64NanoTS) 801 795 { 802 PVM pVM = pTimer->CTXALLSUFF(pVM); NOREF(pVM);803 804 796 switch (pTimer->enmClock) 805 797 { … … 834 826 TMDECL(uint64_t) TMTimerFromMicro(PTMTIMER pTimer, uint64_t u64MicroTS) 835 827 { 836 PVM pVM = pTimer->CTXALLSUFF(pVM); NOREF(pVM);837 838 828 switch (pTimer->enmClock) 839 829 { … … 868 858 TMDECL(uint64_t) TMTimerFromMilli(PTMTIMER pTimer, uint64_t u64MilliTS) 869 859 { 870 PVM pVM = pTimer->CTXALLSUFF(pVM); NOREF(pVM);871 872 860 switch (pTimer->enmClock) 873 861 {
Note:
See TracChangeset
for help on using the changeset viewer.