summaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2010-02-09 12:49:04 -0200
committerAnthony Liguori <aliguori@us.ibm.com>2010-02-10 12:46:06 -0600
commitc37cc7b072fa4ca8d8d21ac31d26baff5f47f9f9 (patch)
treec4c753ca95e59bdb7faafff7bacf78a9c84632a2 /vl.c
parent5307d7d35e70a9bf1b290f2eff00236c7ad22220 (diff)
downloadqemu-c37cc7b072fa4ca8d8d21ac31d26baff5f47f9f9.tar.gz
iothread: fix vcpu stop with smp tcg
Round robin vcpus in tcg_cpu_next even if the vm stopped. This allows all cpus to enter stopped state. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/vl.c b/vl.c
index 29f218987a..98918ac49d 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;