提交 c37cc7b0 编写于 作者: M Marcelo Tosatti 提交者: Anthony Liguori

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: NMarcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 5307d7d3
...@@ -3876,14 +3876,15 @@ static void tcg_cpu_exec(void) ...@@ -3876,14 +3876,15 @@ static void tcg_cpu_exec(void)
for (; next_cpu != NULL; next_cpu = next_cpu->next_cpu) { for (; next_cpu != NULL; next_cpu = next_cpu->next_cpu) {
CPUState *env = cur_cpu = next_cpu; CPUState *env = cur_cpu = next_cpu;
if (!vm_running)
break;
if (timer_alarm_pending) { if (timer_alarm_pending) {
timer_alarm_pending = 0; timer_alarm_pending = 0;
break; break;
} }
if (cpu_can_run(env)) if (cpu_can_run(env))
ret = qemu_cpu_exec(env); ret = qemu_cpu_exec(env);
else if (env->stop)
break;
if (ret == EXCP_DEBUG) { if (ret == EXCP_DEBUG) {
gdb_set_stop_cpu(env); gdb_set_stop_cpu(env);
debug_requested = 1; debug_requested = 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册