aboutsummaryrefslogtreecommitdiff
path: root/cpus.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpus.c')
-rw-r--r--cpus.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpus.c b/cpus.c
index b95cc195d0..7533668d2b 100644
--- a/cpus.c
+++ b/cpus.c
@@ -770,7 +770,7 @@ bool tcg_cpu_exec(void)
if (next_cpu == NULL)
next_cpu = first_cpu;
- for (; next_cpu != NULL; next_cpu = next_cpu->next_cpu) {
+ for (; next_cpu != NULL && !exit_request; next_cpu = next_cpu->next_cpu) {
CPUState *env = cur_cpu = next_cpu;
qemu_clock_enable(vm_clock,
@@ -789,6 +789,7 @@ bool tcg_cpu_exec(void)
break;
}
}
+ exit_request = 0;
return tcg_has_work();
}