[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] iothread: fix vcpu stop with smp tcg
From: |
Marcelo Tosatti |
Subject: |
[Qemu-devel] [PATCH] iothread: fix vcpu stop with smp tcg |
Date: |
Tue, 9 Feb 2010 12:49:04 -0200 |
User-agent: |
Mutt/1.5.20 (2009-08-17) |
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 <address@hidden>
diff --git a/vl.c b/vl.c
index 880bcd5..f61e362 100644
--- a/vl.c
+++ b/vl.c
@@ -3855,14 +3855,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;