- Timestamp:
- Feb 20, 2019 1:40:22 PM (6 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAll.cpp
r77378 r77380 14337 14337 14338 14338 14339 VMMDECL(VBOXSTRICTRC) IEMExecLots(PVMCPU pVCpu, uint32_t *pcInstructions)14339 VMMDECL(VBOXSTRICTRC) IEMExecLots(PVMCPU pVCpu, uint32_t cMaxInstructions, uint32_t cPollRate, uint32_t *pcInstructions) 14340 14340 { 14341 14341 uint32_t const cInstructionsAtStart = pVCpu->iem.s.cInstructions; 14342 AssertMsg(RT_IS_POWER_OF_TWO(cPollRate + 1), ("%#x\n", cPollRate)); 14342 14343 14343 14344 /* … … 14386 14387 * Initial decoder init w/ prefetch, then setup setjmp. 14387 14388 */ 14388 unsigned cTimerPoll = 0;14389 14389 VBOXSTRICTRC rcStrict = iemInitDecoderAndPrefetchOpcodes(pVCpu, false); 14390 14390 if (rcStrict == VINF_SUCCESS) … … 14401 14401 * The run loop. We limit ourselves to 4096 instructions right now. 14402 14402 */ 14403 PVM pVM = pVCpu->CTX_SUFF(pVM); 14404 uint32_t cInstr = 4096; 14403 PVM pVM = pVCpu->CTX_SUFF(pVM); 14405 14404 for (;;) 14406 14405 { … … 14442 14441 && !VM_FF_IS_ANY_SET(pVM, VM_FF_ALL_MASK) )) 14443 14442 { 14444 if (c Instr-- > 0)14443 if (cMaxInstructions-- > 0) 14445 14444 { 14446 /* Poll timers every 128 call*/14447 if ( ( ++cTimerPoll & 0x7f) != 014445 /* Poll timers every 2048 instructions. */ 14446 if ( (cMaxInstructions & cPollRate) != 0 14448 14447 || !TMTimerPollBool(pVM, pVCpu)) 14449 14448 { -
trunk/src/VBox/VMM/VMMR3/EM.cpp
r77159 r77380 1206 1206 rc = REMR3Run(pVM, pVCpu); 1207 1207 #else 1208 rc = VBOXSTRICTRC_TODO(IEMExecLots(pVCpu, NULL /*pcInstructions*/));1208 rc = VBOXSTRICTRC_TODO(IEMExecLots(pVCpu, 8192 /*cMaxInstructions*/, 4095 /*cPollRate*/, NULL /*pcInstructions*/)); 1209 1209 #endif 1210 1210 STAM_PROFILE_STOP(&pVCpu->em.s.StatREMExec, c); … … 1374 1374 { 1375 1375 uint32_t cInstructions; 1376 VBOXSTRICTRC rcStrict = IEMExecLots(pVCpu, &cInstructions); 1376 VBOXSTRICTRC rcStrict = IEMExecLots(pVCpu, 1024 - pVCpu->em.s.cIemThenRemInstructions /*cMaxInstructions*/, 1377 UINT32_MAX/2 /*cPollRate*/, &cInstructions); 1377 1378 pVCpu->em.s.cIemThenRemInstructions += cInstructions; 1378 1379 if (rcStrict != VINF_SUCCESS) … … 2894 2895 case EMSTATE_IEM: 2895 2896 { 2897 uint32_t cInstructions = 0; 2896 2898 #if 0 /* For testing purposes. */ 2897 2899 STAM_PROFILE_START(&pVCpu->em.s.StatHmExec, x1); … … 2902 2904 else if (rc == VERR_EM_CANNOT_EXEC_GUEST) 2903 2905 #endif 2904 rc = VBOXSTRICTRC_TODO(IEMExecLots(pVCpu, NULL /*pcInstructions*/));2906 rc = VBOXSTRICTRC_TODO(IEMExecLots(pVCpu, 4096 /*cMaxInstructions*/, 2047 /*cPollRate*/, &cInstructions)); 2905 2907 if (pVM->em.s.fIemExecutesAll) 2906 2908 { … … 2908 2910 Assert(rc != VINF_EM_RESCHEDULE_RAW); 2909 2911 Assert(rc != VINF_EM_RESCHEDULE_HM); 2912 #ifdef VBOX_HIGH_RES_TIMERS_HACK 2913 if (cInstructions < 2048) 2914 TMTimerPollVoid(pVM, pVCpu); 2915 #endif 2910 2916 } 2911 2917 fFFDone = false;
Note:
See TracChangeset
for help on using the changeset viewer.