Index: /trunk/include/VBox/tm.h
===================================================================
--- /trunk/include/VBox/tm.h	(revision 19820)
+++ /trunk/include/VBox/tm.h	(revision 19821)
@@ -198,5 +198,6 @@
 VMMDECL(int)      TMTimerStop(PTMTIMER pTimer);
 VMMDECL(bool)     TMTimerIsActive(PTMTIMER pTimer);
-VMMDECL(uint64_t) TMTimerPoll(PVM pVM, PVMCPU pVCpu);
+VMMDECL(bool)     TMTimerPollBool(PVM pVM, PVMCPU pVCpu);
+VMMDECL(void)     TMTimerPollVoid(PVM pVM, PVMCPU pVCpu);
 VMMDECL(uint64_t) TMTimerPollGIP(PVM pVM, PVMCPU pVCpu, uint64_t *pu64Delta);
 
Index: /trunk/src/VBox/VMM/EM.cpp
===================================================================
--- /trunk/src/VBox/VMM/EM.cpp	(revision 19820)
+++ /trunk/src/VBox/VMM/EM.cpp	(revision 19821)
@@ -1022,5 +1022,5 @@
          */
 #ifdef VBOX_HIGH_RES_TIMERS_HACK
-        TMTimerPoll(pVM, pVCpu);
+        TMTimerPollVoid(pVM, pVCpu);
 #endif
         AssertCompile((VMCPU_FF_ALL_BUT_RAW_MASK & ~(VMCPU_FF_CSAM_PENDING_ACTION | VMCPU_FF_CSAM_SCAN_PAGE)) & VMCPU_FF_TIMER);
@@ -2948,5 +2948,5 @@
          */
 #ifdef VBOX_HIGH_RES_TIMERS_HACK
-        TMTimerPoll(pVM, pVCpu);
+        TMTimerPollVoid(pVM, pVCpu);
 #endif
         STAM_PROFILE_ADV_STOP(&pVCpu->em.s.StatRAWTail, d);
@@ -3089,5 +3089,5 @@
          */
 #ifdef VBOX_HIGH_RES_TIMERS_HACK
-        TMTimerPoll(pVM, pVCpu);
+        TMTimerPollVoid(pVM, pVCpu);
 #endif
         if (    VM_FF_ISPENDING(pVM, VM_FF_ALL_MASK)
Index: /trunk/src/VBox/VMM/VMEmt.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMEmt.cpp	(revision 19820)
+++ /trunk/src/VBox/VMM/VMEmt.cpp	(revision 19821)
@@ -302,5 +302,6 @@
             ||  VMCPU_FF_ISPENDING(pVCpu, fMask))
             break;
-        uint64_t u64NanoTS = TMVirtualToNano(pVM, TMTimerPoll(pVM, pVCpu));
+        uint64_t u64NanoTS;
+        TMTimerPollGIP(pVM, pVCpu, &u64NanoTS);
         if (    VM_FF_ISPENDING(pVM, VM_FF_EXTERNAL_HALTED_MASK)
             ||  VMCPU_FF_ISPENDING(pVCpu, fMask))
@@ -504,5 +505,6 @@
          * Estimate time left to the next event.
          */
-        uint64_t u64NanoTS = TMVirtualToNano(pVM, TMTimerPoll(pVM, pVCpu));
+        uint64_t u64NanoTS;
+        TMTimerPollGIP(pVM, pVCpu, &u64NanoTS);
         if (    VM_FF_ISPENDING(pVM, VM_FF_EXTERNAL_HALTED_MASK)
             ||  VMCPU_FF_ISPENDING(pVCpu, fMask))
Index: /trunk/src/VBox/VMM/VMMAll/TMAll.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/TMAll.cpp	(revision 19820)
+++ /trunk/src/VBox/VMM/VMMAll/TMAll.cpp	(revision 19821)
@@ -430,5 +430,5 @@
  * @remarks GIP uses ns ticks.
  */
-DECLINLINE(uint64_t) tmTimerPollInternal(PVM pVM, PVMCPU pVCpu, uint64_t *pu64Delta)
+DECL_FORCE_INLINE(uint64_t) tmTimerPollInternal(PVM pVM, PVMCPU pVCpu, uint64_t *pu64Delta)
 {
     PVMCPU                  pVCpuDst      = &pVM->aCpus[pVM->tm.s.idTimerCpu];
@@ -635,16 +635,32 @@
  * This function is called before FFs are checked in the inner execution EM loops.
  *
- * @returns Virtual timer ticks to the next event. (I.e. 0 means that an timer
- *          has expired or some important rescheduling is pending.)
+ * @returns true if timers are pending, false if not.
+ *
  * @param   pVM         Pointer to the shared VM structure.
  * @param   pVCpu       Pointer to the shared VMCPU structure of the caller.
  * @thread  The emulation thread.
  */
-VMMDECL(uint64_t) TMTimerPoll(PVM pVM, PVMCPU pVCpu)
+VMMDECL(bool) TMTimerPollBool(PVM pVM, PVMCPU pVCpu)
 {
     AssertCompile(TMCLOCK_FREQ_VIRTUAL == 1000000000);
     uint64_t off = 0;
     tmTimerPollInternal(pVM, pVCpu, &off);
-    return off;
+    return off == 0;
+}
+
+
+/**
+ * Set FF if we've passed the next virtual event.
+ *
+ * This function is called before FFs are checked in the inner execution EM loops.
+ *
+ * @param   pVM         Pointer to the shared VM structure.
+ * @param   pVCpu       Pointer to the shared VMCPU structure of the caller.
+ * @thread  The emulation thread.
+ */
+VMMDECL(void) TMTimerPollVoid(PVM pVM, PVMCPU pVCpu)
+{
+    uint64_t off;
+    tmTimerPollInternal(pVM, pVCpu, &off);
 }
 
Index: /trunk/src/VBox/VMM/VMMGC/TRPMGCHandlers.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMGC/TRPMGCHandlers.cpp	(revision 19820)
+++ /trunk/src/VBox/VMM/VMMGC/TRPMGCHandlers.cpp	(revision 19821)
@@ -157,6 +157,6 @@
         if (!(++s_iTimerPoll & 0xf))
         {
-            uint64_t cTicks = TMTimerPoll(pVM, pVCpu); NOREF(cTicks);
-            Log2(("TMTimerPoll at %08RX32 returned %RX64 (VM_FF_TM_VIRTUAL_SYNC=%d VM_FF_TM_VIRTUAL_SYNC=%d)\n", pRegFrame->eip, cTicks,
+            TMTimerPollVoid(pVM, pVCpu);
+            Log2(("TMTimerPoll at %08RX32 - VM_FF_TM_VIRTUAL_SYNC=%d VM_FF_TM_VIRTUAL_SYNC=%d\n", pRegFrame->eip,
                   VM_FF_ISPENDING(pVM, VM_FF_TM_VIRTUAL_SYNC), VMCPU_FF_ISPENDING(pVCpu, VMCPU_FF_TIMER)));
         }
Index: /trunk/src/recompiler/VBoxREMWrapper.cpp
===================================================================
--- /trunk/src/recompiler/VBoxREMWrapper.cpp	(revision 19820)
+++ /trunk/src/recompiler/VBoxREMWrapper.cpp	(revision 19821)
@@ -1166,5 +1166,5 @@
     { "TMNotifyEndOfExecution",                 (void *)(uintptr_t)&TMNotifyEndOfExecution,         &g_aArgsVMCPU[0],                           RT_ELEMENTS(g_aArgsVMCPU),                             REMFNDESC_FLAGS_RET_VOID,   0,                  NULL },
     { "TMNotifyStartOfExecution",               (void *)(uintptr_t)&TMNotifyStartOfExecution,       &g_aArgsVMCPU[0],                           RT_ELEMENTS(g_aArgsVMCPU),                             REMFNDESC_FLAGS_RET_VOID,   0,                  NULL },
-    { "TMTimerPoll",                            (void *)(uintptr_t)&TMTimerPoll,                    &g_aArgsVMandVMCPU[0],                      RT_ELEMENTS(g_aArgsVMandVMCPU),                        REMFNDESC_FLAGS_RET_INT,    sizeof(uint64_t),   NULL },
+    { "TMTimerPollBool",                        (void *)(uintptr_t)&TMTimerPollBool,                &g_aArgsVMandVMCPU[0],                      RT_ELEMENTS(g_aArgsVMandVMCPU),                        REMFNDESC_FLAGS_RET_VOID,   sizeof(void),       NULL },
     { "TMR3TimerQueuesDo",                      (void *)(uintptr_t)&TMR3TimerQueuesDo,              &g_aArgsVM[0],                              RT_ELEMENTS(g_aArgsVM),                                REMFNDESC_FLAGS_RET_VOID,   0,                  NULL },
     { "TRPMAssertTrap",                         (void *)(uintptr_t)&TRPMAssertTrap,                 &g_aArgsTRPMAssertTrap[0],                  RT_ELEMENTS(g_aArgsTRPMAssertTrap),                    REMFNDESC_FLAGS_RET_INT,    sizeof(int),        NULL },
Index: /trunk/src/recompiler/cpu-exec.c
===================================================================
--- /trunk/src/recompiler/cpu-exec.c	(revision 19820)
+++ /trunk/src/recompiler/cpu-exec.c	(revision 19821)
@@ -533,5 +533,5 @@
                                             | CPU_INTERRUPT_SINGLE_INSTR | CPU_INTERRUPT_SINGLE_INSTR_IN_FLIGHT))
             &&  (   (env->interrupt_request & CPU_INTERRUPT_EXTERNAL_TIMER)
-                 || !TMTimerPoll(env->pVM, env->pVCpu)) ) {
+                 || TMTimerPollBool(env->pVM, env->pVCpu)) ) {
             ASMAtomicAndS32((int32_t volatile *)&env->interrupt_request, ~CPU_INTERRUPT_EXTERNAL_TIMER);
             remR3ProfileStart(STATS_QEMU_RUN_TIMERS);
