qemu/include/sysemu
Pavel Dovgalyuk 0c08185f8f replay: wake up vCPU when replaying
In record/replay icount mode vCPU thread and iothread synchronize
the execution using the checkpoints.
vCPU thread processes the virtual timers and iothread processes all others.
When iothread wants to wake up sleeping vCPU thread, it sends dummy queued
work. Therefore it could be the following sequence of the events in
record mode:
 - IO: sending dummy work
 - IO: processing timers
 - CPU: wakeup
 - CPU: clearing dummy work
 - CPU: processing virtual timers

But due to the races in replay mode the sequence may change:
 - IO: sending dummy work
 - CPU: wakeup
 - CPU: clearing dummy work
 - CPU: sleeping again because nothing to do
 - IO: Processing timers
 - CPU: zzzz

In this case vCPU will not wake up, because dummy work is not to be set up
again.

This patch tries to wake up the vCPU when it sleeps and the icount warp
checkpoint isn't met. It means that vCPU has something to do, because
there are no other reasons of non-matching warp checkpoint.

Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>

--

v5: improve checking that vCPU is still sleeping
Message-Id: <20180912081945.3228.19776.stgit@pasha-VirtualBox>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-10-02 19:08:51 +02:00
..
accel.h AccelClass: Introduce accel_setup_post 2018-04-26 16:29:50 +01:00
arch_init.h RISC-V Build Infrastructure 2018-03-07 08:30:28 +13:00
balloon.h qapi: Empty out qapi-schema.json 2018-03-02 13:45:50 -06:00
block-backend.h block: split flags in copy_range 2018-07-10 13:04:25 +02:00
blockdev.h block: Remove deprecated -drive option serial 2018-08-15 12:50:39 +02:00
bt.h Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
cpus.h migration: Mark CPU states dirty before incoming migration/loadvm 2017-06-06 08:53:24 +10:00
cryptodev-vhost-user.h cryptodev-vhost-user: set the key length 2018-03-01 18:26:17 +02:00
cryptodev-vhost.h cryptodev: add vhost-user as a new cryptodev backend 2018-03-01 18:26:17 +02:00
cryptodev.h cryptodev: add vhost support 2018-03-01 18:26:17 +02:00
device_tree.h device_tree: Add qemu_fdt_node_unit_path 2018-06-29 15:11:01 +01:00
dma.h Make address_space_access_valid() take a MemTxAttrs argument 2018-05-31 16:32:35 +01:00
dump-arch.h dump: allow target to set the physical base 2016-01-15 14:40:25 +00:00
dump.h qapi: Empty out qapi-schema.json 2018-03-02 13:45:50 -06:00
hax.h hax: Support guest RAM sizes of 4GB or more 2018-02-13 11:44:13 +01:00
hostmem.h hostmem: drop error variable from host_memory_backend_get_memory() 2018-06-28 19:05:33 +02:00
hvf.h Clean up includes 2018-02-09 05:05:11 +01:00
hw_accel.h Add the WHPX acceleration enlightenments 2018-02-07 14:09:26 +01:00
iothread.h vl: introduce vm_shutdown() 2018-03-08 17:38:51 +00:00
kvm.h x86/cpu: use standard-headers/asm-x86.kvm_para.h 2018-05-23 03:14:41 +03:00
kvm_int.h kvm: Delete the slot if and only if the KVM_MEM_READONLY flag is changed 2018-06-28 19:05:31 +02:00
memory_mapping.h Use scripts/clean-includes to drop redundant qemu/typedefs.h 2016-03-22 22:20:16 +01:00
numa.h numa: split out NumaOptions parsing into set_numa_options() 2018-05-30 13:08:11 -03:00
os-posix.h util: drop old utimensat() compat code 2017-05-25 10:30:14 +02:00
os-win32.h log: Add locking to large logging blocks 2016-11-01 10:29:03 -06:00
qtest.h include: Clean up includes 2016-02-23 12:43:05 +00:00
replay.h replay: wake up vCPU when replaying 2018-10-02 19:08:51 +02:00
reset.h hw: move reset handlers from vl.c to hw/core 2017-01-16 17:52:35 +01:00
rng-random.h rng-random: rename RndRandom to RngRandom 2016-05-23 12:18:43 +05:30
rng.h rng: switch request queue to QSIMPLEQ 2016-03-08 12:54:14 +05:30
seccomp.h sandbox: disable -sandbox if CONFIG_SECCOMP undefined 2018-06-01 13:44:15 +02:00
sev.h kvm: introduce memory encryption APIs 2018-03-13 12:04:03 +01:00
sysemu.h fw_cfg: ignore suffixes in the bootdevice list dependent on machine class 2018-08-16 22:27:43 -03:00
tpm.h Include less of the generated modular QAPI headers 2018-03-02 13:45:50 -06:00
tpm_backend.h Drop superfluous includes of qapi-types.h and test-qapi-types.h 2018-02-09 05:05:11 +01:00
watchdog.h Include less of the generated modular QAPI headers 2018-03-02 13:45:50 -06:00
whpx.h Add the WHPX vcpu API 2018-02-07 14:09:26 +01:00
xen-mapcache.h xen/hvm: correct reporting of modified memory under physmap during migration 2018-05-31 12:04:54 -07:00