Changeset 31136 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Jul 27, 2010 12:06:18 PM (15 years ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r31123 r31136 162 162 const RTGCPHYS GCPhysFault = (RTGCPHYS)pvFault; 163 163 # endif 164 PPGMPHYSHANDLER pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhysFault);164 PPGMPHYSHANDLER pCur = pgmHandlerPhysicalLookup(pVM, GCPhysFault); 165 165 if (pCur) 166 166 { … … 212 212 STAM_PROFILE_START(&pCur->Stat, h); 213 213 if (fLeaveLock) 214 pgmUnlock(pVM); /* @todo: Not entirely safe. */214 pgmUnlock(pVM); /** @todo: Not entirely safe. */ 215 215 216 216 rc = pfnHandler(pVM, uErr, pRegFrame, pvFault, GCPhysFault, pvUser); … … 218 218 pgmLock(pVM); 219 219 # ifdef VBOX_WITH_STATISTICS 220 pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhysFault);220 pCur = pgmHandlerPhysicalLookup(pVM, GCPhysFault); 221 221 if (pCur) 222 222 STAM_PROFILE_STOP(&pCur->Stat, h); -
trunk/src/VBox/VMM/VMMAll/PGMAllHandler.cpp
r31123 r31136 5 5 6 6 /* 7 * Copyright (C) 2006-20 07Oracle Corporation7 * Copyright (C) 2006-2010 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 262 262 263 263 /* 264 * Clear the page bits and notify the REM about this change. 264 * Clear the page bits, notify the REM about this change and clear 265 * the cache. 265 266 */ 266 267 pgmHandlerPhysicalResetRamFlags(pVM, pCur); 267 268 pgmHandlerPhysicalDeregisterNotifyREM(pVM, pCur); 269 pVM->pgm.s.pLastPhysHandlerR0 = 0; 270 pVM->pgm.s.pLastPhysHandlerR3 = 0; 271 pVM->pgm.s.pLastPhysHandlerRC = 0; 268 272 MMHyperFree(pVM, pCur); 269 273 pgmUnlock(pVM); … … 575 579 576 580 /* 577 * Invalid new location, f ree it.581 * Invalid new location, flush the cache and free it. 578 582 * We've only gotta notify REM and free the memory. 579 583 */ 580 584 pgmHandlerPhysicalDeregisterNotifyREM(pVM, pCur); 585 pVM->pgm.s.pLastPhysHandlerR0 = 0; 586 pVM->pgm.s.pLastPhysHandlerR3 = 0; 587 pVM->pgm.s.pLastPhysHandlerRC = 0; 581 588 MMHyperFree(pVM, pCur); 582 589 } … … 746 753 LogFlow(("PGMHandlerPhysicalJoin: %RGp-%RGp %RGp-%RGp\n", 747 754 pCur1->Core.Key, pCur1->Core.KeyLast, pCur2->Core.Key, pCur2->Core.KeyLast)); 755 pVM->pgm.s.pLastPhysHandlerR0 = 0; 756 pVM->pgm.s.pLastPhysHandlerR3 = 0; 757 pVM->pgm.s.pLastPhysHandlerRC = 0; 748 758 MMHyperFree(pVM, pCur2); 749 759 pgmUnlock(pVM); … … 1175 1185 */ 1176 1186 pgmLock(pVM); 1177 PPGMPHYSHANDLER pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhys);1187 PPGMPHYSHANDLER pCur = pgmHandlerPhysicalLookup(pVM, GCPhys); 1178 1188 if (pCur) 1179 1189 { … … 1204 1214 { 1205 1215 pgmLock(pVM); 1206 PPGMPHYSHANDLER pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhys);1216 PPGMPHYSHANDLER pCur = pgmHandlerPhysicalLookup(pVM, GCPhys); 1207 1217 if (!pCur) 1208 1218 { -
trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp
r31123 r31136 1758 1758 { 1759 1759 #ifdef IN_RING3 1760 pPhys = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhys);1760 pPhys = pgmHandlerPhysicalLookup(pVM, GCPhys); 1761 1761 AssertReleaseMsg(pPhys, ("GCPhys=%RGp cb=%#x\n", GCPhys, cb)); 1762 1762 Assert(GCPhys >= pPhys->Core.Key && GCPhys <= pPhys->Core.KeyLast); … … 1776 1776 pgmLock(pVM); 1777 1777 # ifdef VBOX_WITH_STATISTICS 1778 pPhys = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhys);1778 pPhys = pgmHandlerPhysicalLookup(pVM, GCPhys); 1779 1779 if (pPhys) 1780 1780 STAM_PROFILE_STOP(&pPhys->Stat, h); … … 1987 1987 || PGM_PAGE_IS_MMIO(pPage) /* screw virtual handlers on MMIO pages */) 1988 1988 { 1989 PPGMPHYSHANDLER pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhys);1989 PPGMPHYSHANDLER pCur = pgmHandlerPhysicalLookup(pVM, GCPhys); 1990 1990 if (pCur) 1991 1991 { … … 2021 2021 pgmLock(pVM); 2022 2022 # ifdef VBOX_WITH_STATISTICS 2023 pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhys);2023 pCur = pgmHandlerPhysicalLookup(pVM, GCPhys); 2024 2024 if (pCur) 2025 2025 STAM_PROFILE_STOP(&pCur->Stat, h); … … 2174 2174 if (fMorePhys && !pPhys) 2175 2175 { 2176 pPhys = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhys);2176 pPhys = pgmHandlerPhysicalLookup(pVM, GCPhys); 2177 2177 if (pPhys) 2178 2178 { … … 2233 2233 pgmLock(pVM); 2234 2234 # ifdef VBOX_WITH_STATISTICS 2235 pPhys = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhys);2235 pPhys = pgmHandlerPhysicalLookup(pVM, GCPhys); 2236 2236 if (pPhys) 2237 2237 STAM_PROFILE_STOP(&pPhys->Stat, h); … … 2302 2302 pgmLock(pVM); 2303 2303 # ifdef VBOX_WITH_STATISTICS 2304 pPhys = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhys);2304 pPhys = pgmHandlerPhysicalLookup(pVM, GCPhys); 2305 2305 if (pPhys) 2306 2306 STAM_PROFILE_STOP(&pPhys->Stat, h);
Note:
See TracChangeset
for help on using the changeset viewer.