]> git.proxmox.com Git - qemu.git/commit
qemu-timer: Introduce clock reset notifier
authorJan Kiszka <jan.kiszka@siemens.com>
Mon, 20 Jun 2011 12:06:27 +0000 (14:06 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Sat, 23 Jul 2011 16:26:12 +0000 (11:26 -0500)
commit691a0c9c9b71360271220c12f20a7238bc302503
treedd73ff536345dad4741b6fab3ccd4112d9fe8215
parent9e8dd45164af05a5dab00324dd10b037f5bd1e2a
qemu-timer: Introduce clock reset notifier

QEMU_CLOCK_HOST is based on the system time which may jump backward in
case the admin or NTP adjusts it. RTC emulations and other device models
can suffer in this case as timers will stall for the period the clock
was tuned back.

This adds a detection mechanism that checks on every host clock readout
if the new time is before the last result. If that is the case a
notifier list is informed. Device models interested in this event can
register a notifier with the clock.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-timer.c
qemu-timer.h