diff options
author | Marcelo Tosatti <mtosatti@redhat.com> | 2010-02-09 12:49:04 -0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-02-23 14:07:57 -0600 |
commit | 535d2eb34a0f1908dc694c51ce8d4ec6dccc7807 (patch) | |
tree | a4a24753f37ad3a3714236f11b0aaf2bb618d14e | |
parent | beb8eab90cd52ce1b53c4b91bab10e954ea14eea (diff) |
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>
(cherry picked from commit c37cc7b072fa4ca8d8d21ac31d26baff5f47f9f9)
-rw-r--r-- | vl.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -4042,14 +4042,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; |