- Timestamp:
- Jun 8, 2009 1:39:32 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/err.h
r20158 r20406 690 690 /** Recompiler execution was interrupted by forced action. */ 691 691 #define VINF_REM_INTERRUPED_FF 2302 692 /** Reason for leaving GC: Must flush pending invlpg operations to REM.693 * Tell REM to flush page invalidations. Will temporary go to REM context694 * from REM and perform the flushes. */695 #define VERR_REM_FLUSHED_PAGES_OVERFLOW (-2303)696 692 /** Too many similar traps. This is a very useful debug only 697 693 * check (we don't do double/tripple faults in REM). */ -
trunk/src/VBox/VMM/EM.cpp
r20399 r20406 2505 2505 2506 2506 /* 2507 * REMGCNotifyInvalidatePage() failed because of overflow.2508 */2509 case VERR_REM_FLUSHED_PAGES_OVERFLOW:2510 Assert((pCtx->ss & X86_SEL_RPL) != 1);2511 EMR3RemLock(pVM);2512 REMR3ReplayInvalidatedPages(pVM, pVCpu);2513 EMR3RemUnlock(pVM);2514 rc = VINF_SUCCESS;2515 break;2516 2517 /*2518 2507 * I/O Port access - emulate the instruction. 2519 2508 */ -
trunk/src/VBox/VMM/VMM.cpp
r20196 r20406 357 357 STAM_REG(pVM, &pVM->vmm.s.StatRZRetPatchGP, STAMTYPE_COUNTER, "/VMM/RZRet/PatchGP", STAMUNIT_OCCURENCES, "Number of VINF_PATM_PATCH_TRAP_GP returns."); 358 358 STAM_REG(pVM, &pVM->vmm.s.StatRZRetPatchIretIRQ, STAMTYPE_COUNTER, "/VMM/RZRet/PatchIret", STAMUNIT_OCCURENCES, "Number of VINF_PATM_PENDING_IRQ_AFTER_IRET returns."); 359 STAM_REG(pVM, &pVM->vmm.s.StatRZRetPageOverflow, STAMTYPE_COUNTER, "/VMM/RZRet/InvlpgOverflow", STAMUNIT_OCCURENCES, "Number of VERR_REM_FLUSHED_PAGES_OVERFLOW returns.");360 359 STAM_REG(pVM, &pVM->vmm.s.StatRZRetRescheduleREM, STAMTYPE_COUNTER, "/VMM/RZRet/ScheduleREM", STAMUNIT_OCCURENCES, "Number of VINF_EM_RESCHEDULE_REM returns."); 361 360 STAM_REG(pVM, &pVM->vmm.s.StatRZRetToR3, STAMTYPE_COUNTER, "/VMM/RZRet/ToR3", STAMUNIT_OCCURENCES, "Number of VINF_EM_RAW_TO_R3 returns."); -
trunk/src/VBox/VMM/VMMAll/EMAll.cpp
r20001 r20406 1888 1888 || rc == VINF_PGM_SYNC_CR3 /* we can rely on the FF */) 1889 1889 return VINF_SUCCESS; 1890 AssertMsgReturn( rc == VERR_REM_FLUSHED_PAGES_OVERFLOW 1891 || rc == VINF_EM_RAW_EMULATE_INSTR, 1890 AssertMsgReturn(rc == VINF_EM_RAW_EMULATE_INSTR, 1892 1891 ("%Rrc addr=%RGv\n", rc, pAddrGC), 1893 1892 VERR_EM_INTERPRETER); … … 1931 1930 || rc == VINF_PGM_SYNC_CR3 /* we can rely on the FF */) 1932 1931 return VINF_SUCCESS; 1933 AssertMsgReturn( rc == VERR_REM_FLUSHED_PAGES_OVERFLOW 1934 || rc == VINF_EM_RAW_EMULATE_INSTR, 1932 AssertMsgReturn(rc == VINF_EM_RAW_EMULATE_INSTR, 1935 1933 ("%Rrc addr=%RGv\n", rc, addr), 1936 1934 VERR_EM_INTERPRETER); -
trunk/src/VBox/VMM/VMMAll/REMAll.cpp
r19479 r20406 41 41 * 42 42 * @returns VINF_SUCCESS on success. 43 * @returns VERR_REM_FLUSHED_PAGES_OVERFLOW if a return to HC for flushing of44 * recorded pages is required before the call can succeed.45 43 * @param pVM The VM handle. 46 44 * @param GCPtrPage The -
trunk/src/VBox/VMM/VMMInternal.h
r20374 r20406 297 297 STAMCOUNTER StatRZRetPatchGP; 298 298 STAMCOUNTER StatRZRetPatchIretIRQ; 299 STAMCOUNTER StatRZRetPageOverflow;300 299 STAMCOUNTER StatRZRetRescheduleREM; 301 300 STAMCOUNTER StatRZRetToR3; -
trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp
r20344 r20406 2652 2652 return VINF_SUCCESS; 2653 2653 } 2654 Assert (rc == VERR_REM_FLUSHED_PAGES_OVERFLOW);2654 AssertRC(rc); 2655 2655 return rc; 2656 2656 } -
trunk/src/VBox/VMM/VMMR0/VMMR0.cpp
r20374 r20406 433 433 case VINF_PATM_PENDING_IRQ_AFTER_IRET: 434 434 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetPatchIretIRQ); 435 break;436 case VERR_REM_FLUSHED_PAGES_OVERFLOW:437 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetPageOverflow);438 435 break; 439 436 case VINF_EM_RESCHEDULE_REM: -
trunk/src/recompiler/VBoxREM.def
r18662 r20406 37 37 REMR3A20Set 38 38 REMR3DisasEnableStepping 39 REMR3ReplayInvalidatedPages40 39 REMR3ReplayHandlerNotifications 41 40 REMR3NotifyPhysRamRegister -
trunk/src/recompiler/VBoxREMWrapper.cpp
r20402 r20406 345 345 static DECLCALLBACKPTR(void, pfnREMR3StateUpdate)(PVM, PVMCPU); 346 346 static DECLCALLBACKPTR(void, pfnREMR3A20Set)(PVM, PVMCPU, bool); 347 static DECLCALLBACKPTR(void, pfnREMR3ReplayInvalidatedPages)(PVM, PVMCPU);348 347 static DECLCALLBACKPTR(void, pfnREMR3ReplayHandlerNotifications)(PVM pVM); 349 348 static DECLCALLBACKPTR(void, pfnREMR3NotifyPhysRamRegister)(PVM, RTGCPHYS, RTGCPHYS, unsigned); … … 1048 1047 { "REMR3StateUpdate", (void *)&pfnREMR3StateUpdate, &g_aArgsVMandVMCPU[0], RT_ELEMENTS(g_aArgsVMandVMCPU), REMFNDESC_FLAGS_RET_VOID, 0, NULL }, 1049 1048 { "REMR3A20Set", (void *)&pfnREMR3A20Set, &g_aArgsA20Set[0], RT_ELEMENTS(g_aArgsA20Set), REMFNDESC_FLAGS_RET_VOID, 0, NULL }, 1050 { "REMR3ReplayInvalidatedPages", (void *)&pfnREMR3ReplayInvalidatedPages, &g_aArgsVMandVMCPU[0], RT_ELEMENTS(g_aArgsVMandVMCPU), REMFNDESC_FLAGS_RET_VOID, 0, NULL },1051 1049 { "REMR3ReplayHandlerNotifications", (void *)&pfnREMR3ReplayHandlerNotifications, &g_aArgsVM[0], RT_ELEMENTS(g_aArgsVM), REMFNDESC_FLAGS_RET_VOID, 0, NULL }, 1052 1050 { "REMR3NotifyPhysRamRegister", (void *)&pfnREMR3NotifyPhysRamRegister, &g_aArgsNotifyPhysRamRegister[0], RT_ELEMENTS(g_aArgsNotifyPhysRamRegister), REMFNDESC_FLAGS_RET_VOID, 0, NULL }, … … 2154 2152 } 2155 2153 2156 REMR3DECL(void) REMR3ReplayInvalidatedPages(PVM pVM, PVMCPU pVCpu)2157 {2158 #ifndef USE_REM_STUBS2159 Assert(VALID_PTR(pfnREMR3ReplayInvalidatedPages));2160 pfnREMR3ReplayInvalidatedPages(pVM, pVCpu);2161 #endif2162 }2163 2164 2154 REMR3DECL(void) REMR3ReplayHandlerNotifications(PVM pVM) 2165 2155 { -
trunk/src/recompiler/VBoxRecompiler.c
r20399 r20406 2682 2682 2683 2683 pVM->rem.s.fIgnoreAll = fSaved; 2684 }2685 2686 2687 /**2688 * Replays the invalidated recorded pages.2689 * Called in response to VERR_REM_FLUSHED_PAGES_OVERFLOW from the RAW execution loop.2690 *2691 * @param pVM VM handle.2692 * @param pVCpu VMCPU handle.2693 */2694 REMR3DECL(void) REMR3ReplayInvalidatedPages(PVM pVM, PVMCPU pVCpu)2695 {2696 RTUINT i;2697 2698 VM_ASSERT_EMT(pVM);2699 2700 /*2701 * Sync the required registers.2702 */2703 pVM->rem.s.Env.cr[0] = pVM->rem.s.pCtx->cr0;2704 pVM->rem.s.Env.cr[2] = pVM->rem.s.pCtx->cr2;2705 pVM->rem.s.Env.cr[3] = pVM->rem.s.pCtx->cr3;2706 pVM->rem.s.Env.cr[4] = pVM->rem.s.pCtx->cr4;2707 2708 /*2709 * Replay the flushes.2710 */2711 pVM->rem.s.fIgnoreInvlPg = true;2712 for (i = 0; i < pVM->rem.s.cInvalidatedPages; i++)2713 {2714 Log2(("REMR3ReplayInvalidatedPages: invlpg %RGv\n", pVM->rem.s.aGCPtrInvalidatedPages[i]));2715 tlb_flush_page(&pVM->rem.s.Env, pVM->rem.s.aGCPtrInvalidatedPages[i]);2716 }2717 pVM->rem.s.fIgnoreInvlPg = false;2718 pVM->rem.s.cInvalidatedPages = 0;2719 2684 } 2720 2685
Note:
See TracChangeset
for help on using the changeset viewer.