Note: to be applied to uq/master. In icount mode, halt emulation should take into account the nearest event when sleeping.
Signed-off-by: Marcelo Tosatti <mtosa...@redhat.com> Reported-and-tested-by: "Edgar E. Iglesias" <edgar.igles...@gmail.com> diff --git a/cpus.c b/cpus.c index 468544c..21c3eba 100644 --- a/cpus.c +++ b/cpus.c @@ -770,7 +770,7 @@ static void qemu_tcg_wait_io_event(void) CPUState *env; while (all_cpu_threads_idle()) { - qemu_cond_timedwait(tcg_halt_cond, &qemu_global_mutex, 1000); + qemu_cond_timedwait(tcg_halt_cond, &qemu_global_mutex, qemu_calculate_timeout()); } qemu_mutex_unlock(&qemu_global_mutex);