From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NfIHs-0002e1-MX for qemu-devel@nongnu.org; Wed, 10 Feb 2010 14:31:48 -0500 Received: from [199.232.76.173] (port=58592 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NfIHs-0002dp-4n for qemu-devel@nongnu.org; Wed, 10 Feb 2010 14:31:48 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NfIHq-0005xk-QS for qemu-devel@nongnu.org; Wed, 10 Feb 2010 14:31:47 -0500 Received: from mail-iw0-f194.google.com ([209.85.223.194]:39936) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NfIHq-0005xc-Gv for qemu-devel@nongnu.org; Wed, 10 Feb 2010 14:31:46 -0500 Received: by iwn32 with SMTP id 32so643729iwn.14 for ; Wed, 10 Feb 2010 11:31:46 -0800 (PST) Message-ID: <4B73099F.9030505@codemonkey.ws> Date: Wed, 10 Feb 2010 13:31:43 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] iothread: fix vcpu stop with smp tcg References: <4B70143C.6000701@siemens.com> <20100209144904.GA31343@amt.cnet> In-Reply-To: <20100209144904.GA31343@amt.cnet> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcelo Tosatti Cc: Jan Kiszka , Anthony Liguori , qemu-devel On 02/09/2010 08:49 AM, Marcelo Tosatti wrote: > 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 > Applied. Thanks. Regards, Anthony Liguori > 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; > > > >