- Timestamp:
- Apr 21, 2008 11:33:22 AM (17 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PATM/CSAM.cpp
r8155 r8217 1818 1818 1819 1819 /** 1820 * Unmonitors a code page 1821 * 1822 * @returns VBox status code 1823 * @param pVM The VM to operate on. 1824 * @param pPageAddrGC The page to monitor 1825 * @param enmTag Monitor tag 1826 */ 1827 CSAMR3DECL(int) CSAMR3UnmonitorPage(PVM pVM, RTGCPTR pPageAddrGC, CSAMTAG enmTag) 1828 { 1829 pPageAddrGC &= PAGE_BASE_GC_MASK; 1830 1831 Log(("CSAMR3UnmonitorPage %VGv %d\n", pPageAddrGC, enmTag)); 1832 1833 Assert(enmTag == CSAM_TAG_REM); 1834 1835 #ifdef VBOX_STRICT 1836 PCSAMPAGEREC pPageRec; 1837 1838 pPageRec = (PCSAMPAGEREC)RTAvlPVGet(&pVM->csam.s.pPageTree, (AVLPVKEY)pPageAddrGC); 1839 Assert(pPageRec && pPageRec->page.enmTag == enmTag); 1840 #endif 1841 return CSAMR3RemovePage(pVM, pPageAddrGC); 1842 } 1843 1844 /** 1820 1845 * Removes a page record from our lookup tree 1821 1846 * -
trunk/src/recompiler/VBoxREMWrapper.cpp
r8155 r8217 493 493 { REMPARMDESC_FLAGS_INT, sizeof(CSAMTAG), NULL } 494 494 }; 495 static const REMPARMDESC g_aArgsCSAMR3UnmonitorPage[] = 496 { 497 { REMPARMDESC_FLAGS_INT, sizeof(PVM), NULL }, 498 { REMPARMDESC_FLAGS_INT, sizeof(RTGCPTR), NULL }, 499 { REMPARMDESC_FLAGS_INT, sizeof(CSAMTAG), NULL } 500 }; 495 501 496 502 static const REMPARMDESC g_aArgsCSAMR3RecordCallAddress[] = … … 1009 1015 { "CPUMQueryGuestCtxPtr", (void *)(uintptr_t)&CPUMQueryGuestCtxPtr, &g_aArgsCPUMQueryGuestCtxPtr[0], ELEMENTS(g_aArgsCPUMQueryGuestCtxPtr), REMFNDESC_FLAGS_RET_INT, sizeof(int), NULL }, 1010 1016 { "CSAMR3MonitorPage", (void *)(uintptr_t)&CSAMR3MonitorPage, &g_aArgsCSAMR3MonitorPage[0], ELEMENTS(g_aArgsCSAMR3MonitorPage), REMFNDESC_FLAGS_RET_INT, sizeof(int), NULL }, 1017 { "CSAMR3UnmonitorPage", (void *)(uintptr_t)&CSAMR3UnmonitorPage, &g_aArgsCSAMR3UnmonitorPage[0], ELEMENTS(g_aArgsCSAMR3UnmonitorPage), REMFNDESC_FLAGS_RET_INT, sizeof(int), NULL }, 1011 1018 { "CSAMR3RecordCallAddress", (void *)(uintptr_t)&CSAMR3RecordCallAddress, &g_aArgsCSAMR3RecordCallAddress[0], ELEMENTS(g_aArgsCSAMR3RecordCallAddress), REMFNDESC_FLAGS_RET_INT, sizeof(int), NULL }, 1012 1019 #if defined(VBOX_WITH_DEBUGGER) && !(defined(RT_OS_WINDOWS) && defined(RT_ARCH_AMD64)) /* the callbacks are problematic */ -
trunk/src/recompiler/VBoxRecompiler.c
r8174 r8217 1375 1375 && !HWACCMIsEnabled(env->pVM)) 1376 1376 CSAMR3MonitorPage(env->pVM, GCPtr, CSAM_TAG_REM); 1377 } 1378 1379 /** 1380 * Called from tlb_unprotect_code in order to clear write monitoring for a code page. 1381 * 1382 * @param env Pointer to the CPU environment. 1383 * @param GCPtr Code page to monitor 1384 */ 1385 void remR3UnprotectCode(CPUState *env, RTGCPTR GCPtr) 1386 { 1387 Assert(env->pVM->rem.s.fInREM); 1388 if ( (env->cr[0] & X86_CR0_PG) /* paging must be enabled */ 1389 && !(env->state & CPU_EMULATE_SINGLE_INSTR) /* ignore during single instruction execution */ 1390 && (((env->hflags >> HF_CPL_SHIFT) & 3) == 0) /* supervisor mode only */ 1391 && !(env->eflags & VM_MASK) /* no V86 mode */ 1392 && !HWACCMIsEnabled(env->pVM)) 1393 CSAMR3UnmonitorPage(env->pVM, GCPtr, CSAM_TAG_REM); 1377 1394 } 1378 1395
Note:
See TracChangeset
for help on using the changeset viewer.