qemu-e2k/replay
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
..
Makefile.objs replay: add record/replay for audio passthrough 2017-03-01 15:11:44 +01:00
replay-audio.c replay: push replay_mutex_lock up the call tree 2018-03-12 17:10:36 +01:00
replay-char.c trivial: Make bios files and source files non-executable 2018-09-25 17:26:18 +02:00
replay-events.c replay: save vmstate of the asynchronous events 2018-03-12 17:10:38 +01:00
replay-input.c Include less of the generated modular QAPI headers 2018-03-02 13:45:50 -06:00
replay-internal.c replay: check return values of fwrite 2018-03-12 17:10:37 +01:00
replay-internal.h replay: save vmstate of the asynchronous events 2018-03-12 17:10:38 +01:00
replay-net.c record/replay: add network support 2017-01-06 10:38:00 +08:00
replay-snapshot.c replay: save vmstate of the asynchronous events 2018-03-12 17:10:38 +01:00
replay-time.c replay: push replay_mutex_lock up the call tree 2018-03-12 17:10:36 +01:00
replay.c replay: wake up vCPU when replaying 2018-10-02 19:08:51 +02:00