Changeset 16045 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Jan 19, 2009 4:27:59 PM (16 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGMInternal.h
r15436 r16045 2907 2907 2908 2908 void pgmR3HandlerPhysicalUpdateAll(PVM pVM); 2909 bool pgmHandlerPhysicalIsAll(PVM pVM, RTGCPHYS GCPhys); 2909 2910 int pgmHandlerVirtualFindByPhysAddr(PVM pVM, RTGCPHYS GCPhys, PPGMVIRTHANDLER *ppVirt, unsigned *piPage); 2910 2911 DECLCALLBACK(int) pgmHandlerVirtualResetOne(PAVLROGCPTRNODECORE pNode, void *pvUser); -
trunk/src/VBox/VMM/PGMPhys.cpp
r15885 r16045 2463 2463 /* nothing */; 2464 2464 #endif 2465 else if (PGM_PAGE_HAS_ACTIVE_ALL_HANDLERS(pPage)) /* catches MMIO */ 2466 rc = VERR_PGM_PHYS_TLB_CATCH_ALL; 2467 else if (fWritable && PGM_PAGE_HAS_ACTIVE_HANDLERS(pPage)) 2468 rc = VINF_PGM_PHYS_TLB_CATCH_WRITE; 2465 else if (PGM_PAGE_HAS_ANY_HANDLERS(pPage)) 2466 { 2467 if (PGM_PAGE_HAS_ACTIVE_ALL_HANDLERS(pPage)) /* catches MMIO */ 2468 rc = VERR_PGM_PHYS_TLB_CATCH_ALL; 2469 else if (fWritable && PGM_PAGE_HAS_ACTIVE_HANDLERS(pPage)) 2470 rc = VINF_PGM_PHYS_TLB_CATCH_WRITE; 2471 else 2472 { 2473 /* Temporariliy disabled phycial handler(s), since the recompiler 2474 doesn't get notified when it's reset we'll have to pretend its 2475 operating normally. */ 2476 if (pgmHandlerPhysicalIsAll(pVM, GCPhys)) 2477 rc = VERR_PGM_PHYS_TLB_CATCH_ALL; 2478 else 2479 rc = VINF_PGM_PHYS_TLB_CATCH_WRITE; 2480 } 2481 } 2469 2482 else 2470 2483 rc = VINF_SUCCESS; -
trunk/src/VBox/VMM/VMMAll/PGMAllHandler.cpp
r15671 r16045 1065 1065 if (pCur) 1066 1066 { 1067 if ( GCPhys >= pCur->Core.Key 1068 && GCPhys <= pCur->Core.KeyLast) 1069 { 1070 Assert( pCur->enmType == PGMPHYSHANDLERTYPE_PHYSICAL_WRITE 1071 || pCur->enmType == PGMPHYSHANDLERTYPE_PHYSICAL_ALL 1072 || pCur->enmType == PGMPHYSHANDLERTYPE_MMIO); 1073 return true; 1074 } 1067 Assert(GCPhys >= pCur->Core.Key && GCPhys <= pCur->Core.KeyLast); 1068 Assert( pCur->enmType == PGMPHYSHANDLERTYPE_PHYSICAL_WRITE 1069 || pCur->enmType == PGMPHYSHANDLERTYPE_PHYSICAL_ALL 1070 || pCur->enmType == PGMPHYSHANDLERTYPE_MMIO); 1071 return true; 1075 1072 } 1076 1073 1077 1074 return false; 1075 } 1076 1077 1078 /** 1079 * Checks if it's an disabled all access handler or write access handler at the 1080 * given address. 1081 * 1082 * @returns true if it's an all access handler, false if it's a write access 1083 * handler. 1084 * @param pVM Pointer to the shared VM structure. 1085 * @param GCPhys The address of the page with a disabled handler. 1086 * 1087 * @remarks The caller, PGMR3PhysTlbGCPhys2Ptr, must hold the PGM lock. 1088 */ 1089 bool pgmHandlerPhysicalIsAll(PVM pVM, RTGCPHYS GCPhys) 1090 { 1091 PPGMPHYSHANDLER pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhys); 1092 AssertReturn(pCur, true); 1093 Assert( pCur->enmType == PGMPHYSHANDLERTYPE_PHYSICAL_WRITE 1094 || pCur->enmType == PGMPHYSHANDLERTYPE_PHYSICAL_ALL 1095 || pCur->enmType == PGMPHYSHANDLERTYPE_MMIO); /* sanity */ 1096 /* Only whole pages can be disabled. */ 1097 Assert( pCur->Core.Key <= (GCPhys & ~(RTGCPHYS)PAGE_OFFSET_MASK) 1098 && pCur->Core.KeyLast >= (GCPhys | PAGE_OFFSET_MASK); 1099 return pCur->enmType != PGMPHYSHANDLERTYPE_PHYSICAL_WRITE; 1078 1100 } 1079 1101
Note:
See TracChangeset
for help on using the changeset viewer.