qemu/stubs
Pavel Dovgalyuk e76d1798fa icount: decouple warp calls
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>
2016-03-15 18:23:45 +01:00
..
arch-query-cpu-def.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
bdrv-commit-all.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
blockdev-close-all-bdrv-states.c all: Clean up includes 2016-02-16 14:29:28 +00:00
clock-warp.c icount: decouple warp calls 2016-03-15 18:23:45 +01:00
cpu-get-clock.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
cpu-get-icount.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
cpus.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
dump.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
fd-register.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
fdset-add-fd.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
fdset-find-fd.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
fdset-get-fd.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
fdset-remove-fd.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
gdbstub.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
get-fd.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
get-next-serial.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
get-vm-name.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
iothread-lock.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
is-daemonized.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
kvm.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
machine-init-done.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
Makefile.objs blockdev: Keep track of monitor-owned BDS 2016-02-02 17:50:46 +01:00
migr-blocker.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
mon-is-qmp.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
mon-printf.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
monitor-init.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
notify-event.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
qmp_pc_dimm_device_list.c move get_current_ram_size to virtio-balloon.c 2016-02-23 12:55:16 +02:00
qtest.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
replay-user.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
replay.c replay: character devices 2016-03-15 18:23:40 +01:00
reset.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
runstate-check.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
set-fd-handler.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
slirp.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
sysbus.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
target-get-monitor-def.c typedefs: Add CPUState 2016-03-01 13:27:09 +00:00
target-monitor-defs.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
uuid.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
vhost.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
vm-stop.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
vmstate.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00