Skip to content

Commit 46967b1

Browse files
Dovgalyukbonzini
authored andcommitted
replay: notify CPU on event
This patch enables vCPU notification to wake it up when new async event comes in replay mode. The motivation of this patch is the following. Consider recorded block async event. It is saved into the log with one of the checkpoints. This checkpoint may be passed in vCPU loop. In replay mode when this async event is read from the log, and block thread task is not finished yet, vCPU thread goes to sleep. That is why this patch adds waking up the vCPU to process this finished event. Signed-off-by: Pavel Dovgalyuk <[email protected]> Message-Id: <161726519158.1476949.7614181684462079836.stgit@pasha-ThinkPad-X280> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent fe852ac commit 46967b1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

replay/replay-events.c

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "replay-internal.h"
1616
#include "block/aio.h"
1717
#include "ui/input.h"
18+
#include "hw/core/cpu.h"
1819

1920
typedef struct Event {
2021
ReplayAsyncEventKind event_kind;
@@ -126,6 +127,7 @@ void replay_add_event(ReplayAsyncEventKind event_kind,
126127

127128
g_assert(replay_mutex_locked());
128129
QTAILQ_INSERT_TAIL(&events_list, event, events);
130+
qemu_cpu_kick(first_cpu);
129131
}
130132

131133
void replay_bh_schedule_event(QEMUBH *bh)

0 commit comments

Comments
 (0)