儲存庫 vbox 的更動 12299
- 時間撮記:
- 2008-9-9 下午02:31:16 (16 年 以前)
- 位置:
- trunk
- 檔案:
-
- 修改 4 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/include/VBox/rem.h
r10413 r12299 68 68 REMR3DECL(int) REMR3BreakpointSet(PVM pVM, RTGCUINTPTR Address); 69 69 REMR3DECL(int) REMR3BreakpointClear(PVM pVM, RTGCUINTPTR Address); 70 REMR3DECL(int) REMR3State(PVM pVM );70 REMR3DECL(int) REMR3State(PVM pVM, bool fFlushTBs); 71 71 REMR3DECL(int) REMR3StateBack(PVM pVM); 72 72 REMR3DECL(void) REMR3StateUpdate(PVM pVM); -
trunk/src/VBox/VMM/EM.cpp
r12079 r12299 723 723 * Switch to REM, step instruction, switch back. 724 724 */ 725 int rc = REMR3State(pVM );725 int rc = REMR3State(pVM, true /* flush the TBs */); 726 726 if (VBOX_SUCCESS(rc)) 727 727 { … … 781 781 { 782 782 STAM_PROFILE_START(&pVM->em.s.StatREMSync, b); 783 rc = REMR3State(pVM );783 rc = REMR3State(pVM, true /* flush TBs */); 784 784 STAM_PROFILE_STOP(&pVM->em.s.StatREMSync, b); 785 785 if (VBOX_FAILURE(rc)) -
trunk/src/recompiler/VBoxREMWrapper.cpp
r12296 r12299 333 333 static DECLCALLBACKPTR(int, pfnREMR3EmulateInstruction)(PVM); 334 334 static DECLCALLBACKPTR(int, pfnREMR3Run)(PVM); 335 static DECLCALLBACKPTR(int, pfnREMR3State)(PVM );335 static DECLCALLBACKPTR(int, pfnREMR3State)(PVM, bool fFlushTBs); 336 336 static DECLCALLBACKPTR(int, pfnREMR3StateBack)(PVM); 337 337 static DECLCALLBACKPTR(void, pfnREMR3StateUpdate)(PVM); … … 963 963 { REMPARMDESC_FLAGS_INT, sizeof(size_t), NULL } 964 964 }; 965 965 static const REMPARMDESC g_aArgsState[] = 966 { 967 { REMPARMDESC_FLAGS_INT, sizeof(PVM), NULL }, 968 { REMPARMDESC_FLAGS_INT, sizeof(bool), NULL } 969 }; 966 970 967 971 /** @} */ … … 980 984 { "REMR3EmulateInstruction", (void *)&pfnREMR3EmulateInstruction, &g_aArgsVM[0], RT_ELEMENTS(g_aArgsVM), REMFNDESC_FLAGS_RET_INT, sizeof(int), NULL }, 981 985 { "REMR3Run", (void *)&pfnREMR3Run, &g_aArgsVM[0], RT_ELEMENTS(g_aArgsVM), REMFNDESC_FLAGS_RET_INT, sizeof(int), NULL }, 982 { "REMR3State", (void *)&pfnREMR3State, &g_aArgs VM[0], RT_ELEMENTS(g_aArgsVM),REMFNDESC_FLAGS_RET_INT, sizeof(int), NULL },986 { "REMR3State", (void *)&pfnREMR3State, &g_aArgsState[0], RT_ELEMENTS(g_aArgsState), REMFNDESC_FLAGS_RET_INT, sizeof(int), NULL }, 983 987 { "REMR3StateBack", (void *)&pfnREMR3StateBack, &g_aArgsVM[0], RT_ELEMENTS(g_aArgsVM), REMFNDESC_FLAGS_RET_INT, sizeof(int), NULL }, 984 988 { "REMR3StateUpdate", (void *)&pfnREMR3StateUpdate, &g_aArgsVM[0], RT_ELEMENTS(g_aArgsVM), REMFNDESC_FLAGS_RET_VOID, 0, NULL }, … … 1956 1960 } 1957 1961 1958 REMR3DECL(int) REMR3State(PVM pVM )1962 REMR3DECL(int) REMR3State(PVM pVM, bool fFlushTBs) 1959 1963 { 1960 1964 #ifdef USE_REM_STUBS … … 1962 1966 #else 1963 1967 Assert(VALID_PTR(pfnREMR3State)); 1964 return pfnREMR3State(pVM );1968 return pfnREMR3State(pVM, fFlushTBs); 1965 1969 #endif 1966 1970 } -
trunk/src/recompiler/VBoxRecompiler.c
r12023 r12299 736 736 * Sync the state and enable single instruction / single stepping. 737 737 */ 738 int rc = REMR3State(pVM );738 int rc = REMR3State(pVM, false /* no need to flush the TBs; we always compile. */); 739 739 if (VBOX_SUCCESS(rc)) 740 740 { … … 1356 1356 void remR3ProtectCode(CPUState *env, RTGCPTR GCPtr) 1357 1357 { 1358 #ifndef VBOX_REM_FLUSH_ALL_TBS 1358 1359 Assert(env->pVM->rem.s.fInREM); 1359 1360 if ( (env->cr[0] & X86_CR0_PG) /* paging must be enabled */ … … 1363 1364 && !HWACCMIsEnabled(env->pVM)) 1364 1365 CSAMR3MonitorPage(env->pVM, GCPtr, CSAM_TAG_REM); 1366 #endif 1365 1367 } 1366 1368 … … 1374 1376 { 1375 1377 Assert(env->pVM->rem.s.fInREM); 1378 #ifndef VBOX_REM_FLUSH_ALL_TBS 1376 1379 if ( (env->cr[0] & X86_CR0_PG) /* paging must be enabled */ 1377 1380 && !(env->state & CPU_EMULATE_SINGLE_INSTR) /* ignore during single instruction execution */ … … 1380 1383 && !HWACCMIsEnabled(env->pVM)) 1381 1384 CSAMR3UnmonitorPage(env->pVM, GCPtr, CSAM_TAG_REM); 1385 #endif 1382 1386 } 1383 1387 … … 1587 1591 * 1588 1592 * @param pVM VM Handle. 1593 * @param fFlushTBs Flush all translation blocks before executing code 1589 1594 * 1590 1595 * @remark The caller has to check for important FFs before calling REMR3Run. REMR3State will … … 1592 1597 * pending that would immediatly interrupt execution. 1593 1598 */ 1594 REMR3DECL(int) REMR3State(PVM pVM)1599 REMR3DECL(int) REMR3State(PVM pVM, bool fFlushTBs) 1595 1600 { 1596 1601 Log2(("REMR3State:\n")); … … 1602 1607 Assert(!pVM->rem.s.fInREM); 1603 1608 pVM->rem.s.fInStateSync = true; 1609 1610 #ifdef VBOX_REM_FLUSH_ALL_TBS 1611 if (fFlushTBs) 1612 tb_flush(&pVM->rem.s.Env); 1613 #endif 1604 1614 1605 1615 /*
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器