Changeset 19821 in vbox
- Timestamp:
- May 19, 2009 1:28:56 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 47475
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/tm.h
r19747 r19821 198 198 VMMDECL(int) TMTimerStop(PTMTIMER pTimer); 199 199 VMMDECL(bool) TMTimerIsActive(PTMTIMER pTimer); 200 VMMDECL(uint64_t) TMTimerPoll(PVM pVM, PVMCPU pVCpu); 200 VMMDECL(bool) TMTimerPollBool(PVM pVM, PVMCPU pVCpu); 201 VMMDECL(void) TMTimerPollVoid(PVM pVM, PVMCPU pVCpu); 201 202 VMMDECL(uint64_t) TMTimerPollGIP(PVM pVM, PVMCPU pVCpu, uint64_t *pu64Delta); 202 203 -
trunk/src/VBox/VMM/EM.cpp
r19793 r19821 1022 1022 */ 1023 1023 #ifdef VBOX_HIGH_RES_TIMERS_HACK 1024 TMTimerPoll (pVM, pVCpu);1024 TMTimerPollVoid(pVM, pVCpu); 1025 1025 #endif 1026 1026 AssertCompile((VMCPU_FF_ALL_BUT_RAW_MASK & ~(VMCPU_FF_CSAM_PENDING_ACTION | VMCPU_FF_CSAM_SCAN_PAGE)) & VMCPU_FF_TIMER); … … 2948 2948 */ 2949 2949 #ifdef VBOX_HIGH_RES_TIMERS_HACK 2950 TMTimerPoll (pVM, pVCpu);2950 TMTimerPollVoid(pVM, pVCpu); 2951 2951 #endif 2952 2952 STAM_PROFILE_ADV_STOP(&pVCpu->em.s.StatRAWTail, d); … … 3089 3089 */ 3090 3090 #ifdef VBOX_HIGH_RES_TIMERS_HACK 3091 TMTimerPoll (pVM, pVCpu);3091 TMTimerPollVoid(pVM, pVCpu); 3092 3092 #endif 3093 3093 if ( VM_FF_ISPENDING(pVM, VM_FF_ALL_MASK) -
trunk/src/VBox/VMM/VMEmt.cpp
r19797 r19821 302 302 || VMCPU_FF_ISPENDING(pVCpu, fMask)) 303 303 break; 304 uint64_t u64NanoTS = TMVirtualToNano(pVM, TMTimerPoll(pVM, pVCpu)); 304 uint64_t u64NanoTS; 305 TMTimerPollGIP(pVM, pVCpu, &u64NanoTS); 305 306 if ( VM_FF_ISPENDING(pVM, VM_FF_EXTERNAL_HALTED_MASK) 306 307 || VMCPU_FF_ISPENDING(pVCpu, fMask)) … … 504 505 * Estimate time left to the next event. 505 506 */ 506 uint64_t u64NanoTS = TMVirtualToNano(pVM, TMTimerPoll(pVM, pVCpu)); 507 uint64_t u64NanoTS; 508 TMTimerPollGIP(pVM, pVCpu, &u64NanoTS); 507 509 if ( VM_FF_ISPENDING(pVM, VM_FF_EXTERNAL_HALTED_MASK) 508 510 || VMCPU_FF_ISPENDING(pVCpu, fMask)) -
trunk/src/VBox/VMM/VMMAll/TMAll.cpp
r19820 r19821 430 430 * @remarks GIP uses ns ticks. 431 431 */ 432 DECL INLINE(uint64_t) tmTimerPollInternal(PVM pVM, PVMCPU pVCpu, uint64_t *pu64Delta)432 DECL_FORCE_INLINE(uint64_t) tmTimerPollInternal(PVM pVM, PVMCPU pVCpu, uint64_t *pu64Delta) 433 433 { 434 434 PVMCPU pVCpuDst = &pVM->aCpus[pVM->tm.s.idTimerCpu]; … … 635 635 * This function is called before FFs are checked in the inner execution EM loops. 636 636 * 637 * @returns Virtual timer ticks to the next event. (I.e. 0 means that an timer638 * has expired or some important rescheduling is pending.)637 * @returns true if timers are pending, false if not. 638 * 639 639 * @param pVM Pointer to the shared VM structure. 640 640 * @param pVCpu Pointer to the shared VMCPU structure of the caller. 641 641 * @thread The emulation thread. 642 642 */ 643 VMMDECL( uint64_t) TMTimerPoll(PVM pVM, PVMCPU pVCpu)643 VMMDECL(bool) TMTimerPollBool(PVM pVM, PVMCPU pVCpu) 644 644 { 645 645 AssertCompile(TMCLOCK_FREQ_VIRTUAL == 1000000000); 646 646 uint64_t off = 0; 647 647 tmTimerPollInternal(pVM, pVCpu, &off); 648 return off; 648 return off == 0; 649 } 650 651 652 /** 653 * Set FF if we've passed the next virtual event. 654 * 655 * This function is called before FFs are checked in the inner execution EM loops. 656 * 657 * @param pVM Pointer to the shared VM structure. 658 * @param pVCpu Pointer to the shared VMCPU structure of the caller. 659 * @thread The emulation thread. 660 */ 661 VMMDECL(void) TMTimerPollVoid(PVM pVM, PVMCPU pVCpu) 662 { 663 uint64_t off; 664 tmTimerPollInternal(pVM, pVCpu, &off); 649 665 } 650 666 -
trunk/src/VBox/VMM/VMMGC/TRPMGCHandlers.cpp
r19660 r19821 157 157 if (!(++s_iTimerPoll & 0xf)) 158 158 { 159 uint64_t cTicks = TMTimerPoll(pVM, pVCpu); NOREF(cTicks);160 Log2(("TMTimerPoll at %08RX32 returned %RX64 (VM_FF_TM_VIRTUAL_SYNC=%d VM_FF_TM_VIRTUAL_SYNC=%d)\n", pRegFrame->eip, cTicks,159 TMTimerPollVoid(pVM, pVCpu); 160 Log2(("TMTimerPoll at %08RX32 - VM_FF_TM_VIRTUAL_SYNC=%d VM_FF_TM_VIRTUAL_SYNC=%d\n", pRegFrame->eip, 161 161 VM_FF_ISPENDING(pVM, VM_FF_TM_VIRTUAL_SYNC), VMCPU_FF_ISPENDING(pVCpu, VMCPU_FF_TIMER))); 162 162 } -
trunk/src/recompiler/VBoxREMWrapper.cpp
r19747 r19821 1166 1166 { "TMNotifyEndOfExecution", (void *)(uintptr_t)&TMNotifyEndOfExecution, &g_aArgsVMCPU[0], RT_ELEMENTS(g_aArgsVMCPU), REMFNDESC_FLAGS_RET_VOID, 0, NULL }, 1167 1167 { "TMNotifyStartOfExecution", (void *)(uintptr_t)&TMNotifyStartOfExecution, &g_aArgsVMCPU[0], RT_ELEMENTS(g_aArgsVMCPU), REMFNDESC_FLAGS_RET_VOID, 0, NULL }, 1168 { "TMTimerPoll ", (void *)(uintptr_t)&TMTimerPoll, &g_aArgsVMandVMCPU[0], RT_ELEMENTS(g_aArgsVMandVMCPU), REMFNDESC_FLAGS_RET_INT, sizeof(uint64_t),NULL },1168 { "TMTimerPollBool", (void *)(uintptr_t)&TMTimerPollBool, &g_aArgsVMandVMCPU[0], RT_ELEMENTS(g_aArgsVMandVMCPU), REMFNDESC_FLAGS_RET_VOID, sizeof(void), NULL }, 1169 1169 { "TMR3TimerQueuesDo", (void *)(uintptr_t)&TMR3TimerQueuesDo, &g_aArgsVM[0], RT_ELEMENTS(g_aArgsVM), REMFNDESC_FLAGS_RET_VOID, 0, NULL }, 1170 1170 { "TRPMAssertTrap", (void *)(uintptr_t)&TRPMAssertTrap, &g_aArgsTRPMAssertTrap[0], RT_ELEMENTS(g_aArgsTRPMAssertTrap), REMFNDESC_FLAGS_RET_INT, sizeof(int), NULL }, -
trunk/src/recompiler/cpu-exec.c
r19660 r19821 533 533 | CPU_INTERRUPT_SINGLE_INSTR | CPU_INTERRUPT_SINGLE_INSTR_IN_FLIGHT)) 534 534 && ( (env->interrupt_request & CPU_INTERRUPT_EXTERNAL_TIMER) 535 || !TMTimerPoll(env->pVM, env->pVCpu)) ) {535 || TMTimerPollBool(env->pVM, env->pVCpu)) ) { 536 536 ASMAtomicAndS32((int32_t volatile *)&env->interrupt_request, ~CPU_INTERRUPT_EXTERNAL_TIMER); 537 537 remR3ProfileStart(STATS_QEMU_RUN_TIMERS);
Note:
See TracChangeset
for help on using the changeset viewer.