• Jan Kiszka's avatar
    qemu-timer: Introduce clock reset notifier · 691a0c9c
    Jan Kiszka authored
    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: default avatarJan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
    691a0c9c
qemu-timer.c 31.8 KB