mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-24 12:09:58 +00:00
e76d1798fa
qemu_clock_warp function is called to update virtual clock when CPU is sleeping. This function includes replay checkpoint to make execution deterministic in icount mode. Record/replay module flushes async event queue at checkpoints. Some of the events (e.g., block devices operations) include interaction with hardware. E.g., APIC polled by block devices sets one of IRQ flags. Flag to be set depends on currently executed thread (CPU or iothread). Therefore in replay mode we have to process the checkpoints in the same thread as they were recorded. qemu_clock_warp function (and its checkpoint) may be called from different thread. This patch decouples two different execution cases of this function: call when CPU is sleeping from iothread and call from cpu thread to update virtual clock. First task is performed by qemu_start_warp_timer function. It sets warp timer event to the moment of nearest pending virtual timer. Second function (qemu_account_warp_timer) is called from cpu thread before execution of the code. It advances virtual clock by adding the length of period while CPU was sleeping. Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20160310115609.4812.44986.stgit@PASHA-ISP> [Update docs. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> |
||
---|---|---|
.. | ||
arch-query-cpu-def.c | ||
bdrv-commit-all.c | ||
blockdev-close-all-bdrv-states.c | ||
clock-warp.c | ||
cpu-get-clock.c | ||
cpu-get-icount.c | ||
cpus.c | ||
dump.c | ||
fd-register.c | ||
fdset-add-fd.c | ||
fdset-find-fd.c | ||
fdset-get-fd.c | ||
fdset-remove-fd.c | ||
gdbstub.c | ||
get-fd.c | ||
get-next-serial.c | ||
get-vm-name.c | ||
iothread-lock.c | ||
is-daemonized.c | ||
kvm.c | ||
machine-init-done.c | ||
Makefile.objs | ||
migr-blocker.c | ||
mon-is-qmp.c | ||
mon-printf.c | ||
monitor-init.c | ||
notify-event.c | ||
qmp_pc_dimm_device_list.c | ||
qtest.c | ||
replay-user.c | ||
replay.c | ||
reset.c | ||
runstate-check.c | ||
set-fd-handler.c | ||
slirp.c | ||
sysbus.c | ||
target-get-monitor-def.c | ||
target-monitor-defs.c | ||
uuid.c | ||
vhost.c | ||
vm-stop.c | ||
vmstate.c |