Index: /trunk/src/VBox/Devices/PC/DevPit-i8254.cpp
===================================================================
--- /trunk/src/VBox/Devices/PC/DevPit-i8254.cpp	(revision 35847)
+++ /trunk/src/VBox/Devices/PC/DevPit-i8254.cpp	(revision 35848)
@@ -177,5 +177,5 @@
 #ifdef IN_RING3
 PDMBOTHCBDECL(int) pitIOPortSpeakerWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb);
-static void pit_irq_timer_update(PITChannelState *s, uint64_t current_time, uint64_t now);
+static void pit_irq_timer_update(PITChannelState *s, uint64_t current_time, uint64_t now, bool in_timer);
 #endif
 RT_C_DECLS_END
@@ -307,5 +307,5 @@
             Log(("pit_set_gate: restarting mode %d\n", s->mode));
             s->count_load_time = TMTimerGet(pTimer);
-            pit_irq_timer_update(s, s->count_load_time, s->count_load_time);
+            pit_irq_timer_update(s, s->count_load_time, s->count_load_time, false);
         }
         break;
@@ -316,5 +316,5 @@
             Log(("pit_set_gate: restarting mode %d\n", s->mode));
             s->count_load_time = s->u64ReloadTS = TMTimerGet(pTimer);
-            pit_irq_timer_update(s, s->count_load_time, s->count_load_time);
+            pit_irq_timer_update(s, s->count_load_time, s->count_load_time, false);
         }
         /* XXX: disable/enable counting */
@@ -331,5 +331,5 @@
     s->count_load_time = s->u64ReloadTS = TMTimerGet(pTimer);
     s->count = val;
-    pit_irq_timer_update(s, s->count_load_time, s->count_load_time);
+    pit_irq_timer_update(s, s->count_load_time, s->count_load_time, false);
 
     /* log the new rate (ch 0 only). */
@@ -419,5 +419,5 @@
 }
 
-static void pit_irq_timer_update(PITChannelState *s, uint64_t current_time, uint64_t now)
+static void pit_irq_timer_update(PITChannelState *s, uint64_t current_time, uint64_t now, bool in_timer)
 {
     int64_t expire_time;
@@ -438,8 +438,13 @@
         pDevIns = s->CTX_SUFF(pPit)->pDevIns;
 
-        if (EFFECTIVE_MODE(s->mode) == 2)
+        if (EFFECTIVE_MODE(s->mode) == 2 && in_timer)
         {
-            /* We just flip-flop the irq level to save that extra timer call, which isn't generally required (we haven't served it for years). */
+            /* We just flip-flop the irq level to save that extra timer call, which
+             * isn't generally required (we haven't served it for years). However,
+             * the pulse is only generated when running on the timer callback (and
+             * thus on the trailing edge of the output signal pulse).
+             */
             PDMDevHlpISASetIrq(pDevIns, s->irq, PDM_IRQ_LEVEL_FLIP_FLOP);
+
         } else
             PDMDevHlpISASetIrq(pDevIns, s->irq, irq_level);
@@ -896,5 +901,5 @@
     STAM_PROFILE_ADV_START(&s->CTX_SUFF(pPit)->StatPITHandler, a);
     Log(("pitTimer\n"));
-    pit_irq_timer_update(s, s->next_transition_time, TMTimerGet(pTimer));
+    pit_irq_timer_update(s, s->next_transition_time, TMTimerGet(pTimer), true);
     STAM_PROFILE_ADV_STOP(&s->CTX_SUFF(pPit)->StatPITHandler, a);
 }
