]> git.ipfire.org Git - thirdparty/qemu.git/commit
fix rtc-td-hack on host without high-res timers
authorGleb Natapov <gleb@redhat.com>
Tue, 8 Dec 2009 13:50:54 +0000 (15:50 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Sat, 12 Dec 2009 14:17:28 +0000 (08:17 -0600)
commit5b6321a237e00e7642f0c205e13a1382988e59c2
tree13ecab76a7ffd1eaebe9daf1b172231ec666a0df
parent5e0c45584215c4ade73d8285da701ca445232286
fix rtc-td-hack on host without high-res timers

On hosts without high-res timers it is impossible to inject rtc interrupt
faster then 1kHz. Windows sometimes configures RTC to generate 1kHz
interrupts, so we can't inject missed interrupts when running on such
hosts. Always injecting an interrupt on REG_C read is also not an option
since Windows wait for REG_C to become zero with interrupt disabled
during boot. This patch uses mixed approach: accelerate timer + inject
up to 1000 interrupts on REG_C read.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit ba32edab7fdab0e74b54696942b4127d26861cf6)
hw/mc146818rtc.c