From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NerP7-0005U2-3b for qemu-devel@nongnu.org; Tue, 09 Feb 2010 09:49:29 -0500 Received: from [199.232.76.173] (port=45835 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NerP6-0005Tu-Ns for qemu-devel@nongnu.org; Tue, 09 Feb 2010 09:49:28 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NerP5-0002DN-90 for qemu-devel@nongnu.org; Tue, 09 Feb 2010 09:49:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:8936) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NerP4-0002DH-TV for qemu-devel@nongnu.org; Tue, 09 Feb 2010 09:49:27 -0500 Date: Tue, 9 Feb 2010 12:49:04 -0200 From: Marcelo Tosatti Message-ID: <20100209144904.GA31343@amt.cnet> References: <4B70143C.6000701@siemens.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B70143C.6000701@siemens.com> Subject: [Qemu-devel] [PATCH] iothread: fix vcpu stop with smp tcg List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Anthony Liguori , qemu-devel 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 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;