diff --git a/vl.c b/vl.c index 29f218987a4d4596c26cbf4ae1351833a02b2d85..98918ac49d25bdf2a66b07552573e83251259b77 100644 --- a/vl.c +++ b/vl.c @@ -3876,14 +3876,15 @@ static void tcg_cpu_exec(void) for (; next_cpu != NULL; next_cpu = next_cpu->next_cpu) { CPUState *env = cur_cpu = next_cpu; - if (!vm_running) - break; if (timer_alarm_pending) { timer_alarm_pending = 0; break; } if (cpu_can_run(env)) ret = qemu_cpu_exec(env); + else if (env->stop) + break; + if (ret == EXCP_DEBUG) { gdb_set_stop_cpu(env); debug_requested = 1;