Change RTC time drift IRQ re-injection (Gleb Natapov)
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 22 Apr 2009 20:20:22 +0000 (20:20 +0000)
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 22 Apr 2009 20:20:22 +0000 (20:20 +0000)
commit93b665693dd4afd32c89b0d5ee2b407b26a7a3bc
tree0c2fff77f29bf823f6bd3245094606c664634fd8
parent2ed51f5bfda2c5bb903a9abaa21c0e756f8486bd
Change RTC time drift IRQ re-injection (Gleb Natapov)

Currently IRQ are reinjected as soon as they are acknowledged to
the RTC, but Windows sometimes do acknowledgement in a loop with
global interrupt disabled waiting for interrupt to be cleared and
it does not mask RTC vector in PIC/APIC while doing this. In such
situation interrupt injection always fails and RTC interrupt is never
cleared.

Instead of reinjecting coalesced IRQs on acknowledgement the patch below
reinjects them by accelerating RTC clock a bit. This way RTC interrupt
is not constantly raced after coalesced interrupt.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7231 c046a42c-6fe2-441c-8c8c-71466251a162
hw/mc146818rtc.c