]> git.ipfire.org Git - thirdparty/qemu.git/commit
mc146818rtc: fix timer interrupt reinjection again
authorPaolo Bonzini <pbonzini@redhat.com>
Sun, 17 Nov 2019 09:28:14 +0000 (10:28 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 19 Nov 2019 09:02:13 +0000 (10:02 +0100)
commit7a3e29b12f5afe0106a5713bb4db6e23dc66ef91
treeac5e365b8aa9d01c6d07b5537aaf2d20167a835e
parent3ae32adff17226bc6a5f3fd7bb9804e6779e0660
mc146818rtc: fix timer interrupt reinjection again

Commit 369b41359af46bded5799c9ef8be2b641d92e043 broke timer interrupt
reinjection when there is no period change by the guest.  In that
case, old_period is 0, which ends up zeroing irq_coalesced (counter of
reinjected interrupts).

The consequence is Windows 7 is unable to synchronize time via NTP.
Easily reproducible by playing a fullscreen video with cirrus and VNC.

Fix by passing s->period when periodic_timer_update is called due to
expiration of the timer.  With this change, old_period == 0 only
means that the periodic timer was off.

Reported-by: Marcelo Tosatti <mtosatti@redhat.com>
Co-developed-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/rtc/mc146818rtc.c