timer: introduce new virtual clock
commit87f4fe7653baf55b5c2f2753fe6003f473c07342
authorPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
Wed, 12 Sep 2018 08:20:02 +0000 (12 11:20 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 2 Oct 2018 17:08:58 +0000 (2 19:08 +0200)
tree1bfc1d1f1dfe334f259941eceb656667ec0c8044
parentbb3d7702e8dd0fd84c9496e226b46ce964b76e13
timer: introduce new virtual clock

Slirp and VNC modules use virtual clock for processing some events that
are related to the guest execution speed.
But virtual clock-related events are consideres to be deterministic and
are recorded/replayed by icount mechanism. But slirp and VNC lie outside
the recorded guest core (which includes CPU and peripherals).
Therefore slirp and VNC are external for the guest, but should work at
guest speed.
This patch introduces new virtual clock which can be used for external
subsystems for running timers that are synchronized with the guest.

Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
Message-Id: <20180912082002.3228.82417.stgit@pasha-VirtualBox>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
include/qemu/timer.h
util/qemu-timer.c