mirror of https://github.com/proxmox/mirror_qemu
util/async: Only call icount_notify_exit() if icount is enabled
Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20231208113529.74067-6-philmd@linaro.org>master
parent
2412813286
commit
72c603f82f
|
@ -495,7 +495,9 @@ bool icount_configure(QemuOpts *opts, Error **errp)
|
||||||
|
|
||||||
void icount_notify_exit(void)
|
void icount_notify_exit(void)
|
||||||
{
|
{
|
||||||
if (icount_enabled() && current_cpu) {
|
assert(icount_enabled());
|
||||||
|
|
||||||
|
if (current_cpu) {
|
||||||
qemu_cpu_kick(current_cpu);
|
qemu_cpu_kick(current_cpu);
|
||||||
qemu_clock_notify(QEMU_CLOCK_VIRTUAL);
|
qemu_clock_notify(QEMU_CLOCK_VIRTUAL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ void icount_account_warp_timer(void)
|
||||||
{
|
{
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
void icount_notify_exit(void)
|
void icount_notify_exit(void)
|
||||||
{
|
{
|
||||||
|
abort();
|
||||||
}
|
}
|
||||||
|
|
16
util/async.c
16
util/async.c
|
@ -94,13 +94,15 @@ static void aio_bh_enqueue(QEMUBH *bh, unsigned new_flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
aio_notify(ctx);
|
aio_notify(ctx);
|
||||||
/*
|
if (unlikely(icount_enabled())) {
|
||||||
* Workaround for record/replay.
|
/*
|
||||||
* vCPU execution should be suspended when new BH is set.
|
* Workaround for record/replay.
|
||||||
* This is needed to avoid guest timeouts caused
|
* vCPU execution should be suspended when new BH is set.
|
||||||
* by the long cycles of the execution.
|
* This is needed to avoid guest timeouts caused
|
||||||
*/
|
* by the long cycles of the execution.
|
||||||
icount_notify_exit();
|
*/
|
||||||
|
icount_notify_exit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Only called from aio_bh_poll() and aio_ctx_finalize() */
|
/* Only called from aio_bh_poll() and aio_ctx_finalize() */
|
||||||
|
|
Loading…
Reference in New Issue