mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 18:23:57 -06:00
replay: rewrite async event handling
This patch decouples checkpoints and async events. It was a tricky part of replay implementation. Now it becomes much simpler and easier to maintain. Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru> Acked-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <165364837856.688121.8785039478408995979.stgit@pasha-ThinkPad-X280> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
75bbe5e5ec
commit
60618e2d77
8 changed files with 54 additions and 76 deletions
|
@ -84,8 +84,7 @@ void icount_handle_deadline(void)
|
|||
* Don't interrupt cpu thread, when these events are waiting
|
||||
* (i.e., there is no checkpoint)
|
||||
*/
|
||||
if (deadline == 0
|
||||
&& (replay_mode != REPLAY_MODE_PLAY || replay_has_checkpoint())) {
|
||||
if (deadline == 0) {
|
||||
icount_notify_aio_contexts();
|
||||
}
|
||||
}
|
||||
|
@ -109,7 +108,7 @@ void icount_prepare_for_run(CPUState *cpu)
|
|||
|
||||
replay_mutex_lock();
|
||||
|
||||
if (cpu->icount_budget == 0 && replay_has_checkpoint()) {
|
||||
if (cpu->icount_budget == 0) {
|
||||
icount_notify_aio_contexts();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue