Changeset 32087 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Aug 30, 2010 12:23:05 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 65355
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/PGMR0.cpp
r32036 r32087 340 340 if (RT_LIKELY(pHandler && pHandler->enmType != PGMPHYSHANDLERTYPE_PHYSICAL_WRITE)) 341 341 { 342 if (pHandler->CTX_SUFF(pfnHandler)) 343 { 344 CTX_MID(PFNPGM,PHYSHANDLER) pfnHandler = pHandler->CTX_SUFF(pfnHandler); 345 void *pvUser = pHandler->CTX_SUFF(pvUser); 346 STAM_PROFILE_START(&pHandler->Stat, h); 342 /* 343 * If the handle has aliases page or pages that have been temporarily 344 * disabled, we'll have to take a detour to make sure we resync them 345 * to avoid lots of unnecessary exits. 346 */ 347 PPGMPAGE pPage; 348 if ( ( pHandler->cAliasedPages 349 || pHandler->cTmpOffPages) 350 && ( (pPage = pgmPhysGetPage(&pVM->pgm.s, GCPhysFault)) == NULL 351 || PGM_PAGE_GET_HNDL_PHYS_STATE(pPage) == PGM_PAGE_HNDL_PHYS_STATE_DISABLED) 352 ) 353 { 354 Log(("PGMR0Trap0eHandlerNPMisconfig: Resyncing aliases / tmp-off page at %RGp (uErr=%#x) %R[pgmpage]\n", GCPhysFault, uErr, pPage)); 355 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0NpMiscfgSyncPage); 356 rc = pgmShwSyncNestedPageLocked(pVCpu, GCPhysFault, 1 /*cPages*/, enmShwPagingMode); 347 357 pgmUnlock(pVM); 348 349 Log6(("PGMR0Trap0eHandlerNPMisconfig: calling %p(,%#x,,%RGp,%p)\n", pfnHandler, uErr, GCPhysFault, pvUser)); 350 rc = pfnHandler(pVM, uErr == UINT32_MAX ? RTGCPTR_MAX : uErr, pRegFrame, GCPhysFault, GCPhysFault, pvUser); 358 } 359 else 360 { 361 if (pHandler->CTX_SUFF(pfnHandler)) 362 { 363 CTX_MID(PFNPGM,PHYSHANDLER) pfnHandler = pHandler->CTX_SUFF(pfnHandler); 364 void *pvUser = pHandler->CTX_SUFF(pvUser); 365 STAM_PROFILE_START(&pHandler->Stat, h); 366 pgmUnlock(pVM); 367 368 Log6(("PGMR0Trap0eHandlerNPMisconfig: calling %p(,%#x,,%RGp,%p)\n", pfnHandler, uErr, GCPhysFault, pvUser)); 369 rc = pfnHandler(pVM, uErr == UINT32_MAX ? RTGCPTR_MAX : uErr, pRegFrame, GCPhysFault, GCPhysFault, pvUser); 351 370 352 371 #ifdef VBOX_WITH_STATISTICS 353 pgmLock(pVM);354 pHandler = pgmHandlerPhysicalLookup(pVM, GCPhysFault);355 if (pHandler)356 STAM_PROFILE_STOP(&pHandler->Stat, h);357 pgmUnlock(pVM);372 pgmLock(pVM); 373 pHandler = pgmHandlerPhysicalLookup(pVM, GCPhysFault); 374 if (pHandler) 375 STAM_PROFILE_STOP(&pHandler->Stat, h); 376 pgmUnlock(pVM); 358 377 #endif 359 } 360 else 361 { 362 pgmUnlock(pVM); 363 Log(("PGMR0Trap0eHandlerNPMisconfig: %RGp (uErr=%#x) -> R3\n", GCPhysFault, uErr)); 364 rc = VINF_EM_RAW_EMULATE_INSTR; 378 } 379 else 380 { 381 pgmUnlock(pVM); 382 Log(("PGMR0Trap0eHandlerNPMisconfig: %RGp (uErr=%#x) -> R3\n", GCPhysFault, uErr)); 383 rc = VINF_EM_RAW_EMULATE_INSTR; 384 } 365 385 } 366 386 } … … 369 389 /* 370 390 * Must be out of sync, so do a SyncPage and restart the instruction. 391 * 392 * ASSUMES that ALL handlers are page aligned and covers whole pages 393 * (assumption asserted in PGMHandlerPhysicalRegisterEx). 371 394 */ 372 395 Log(("PGMR0Trap0eHandlerNPMisconfig: Out of sync page at %RGp (uErr=%#x)\n", GCPhysFault, uErr));
Note:
See TracChangeset
for help on using the changeset viewer.