From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXrzG-0005Z2-Eo for qemu-devel@nongnu.org; Thu, 02 May 2013 07:47:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UXrzF-00020M-8c for qemu-devel@nongnu.org; Thu, 02 May 2013 07:47:46 -0400 Received: from cantor2.suse.de ([195.135.220.15]:41702 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXrzF-0001zg-2A for qemu-devel@nongnu.org; Thu, 02 May 2013 07:47:45 -0400 Message-ID: <51825260.70206@suse.de> Date: Thu, 02 May 2013 13:47:44 +0200 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1367488340-14782-1-git-send-email-afaerber@suse.de> <51823C8B.3060102@siemens.com> In-Reply-To: <51823C8B.3060102@siemens.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH qom-cpu for-1.5] cpus: Fix pausing TCG CPUs while in vCPU thread List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: "peter.maydell@linaro.org" , "qemu-devel@nongnu.org" Am 02.05.2013 12:14, schrieb Jan Kiszka: > On 2013-05-02 11:52, Andreas F=C3=A4rber wrote: >> Due to a preceding while loop, no CPU would've been put into stopped >> state. Reinitialize the variable. >> This fixes commit d798e97456658ea7605303b7c69b04ec7df95c10 (Allow to u= se >> pause_all_vcpus from VCPU context) for non-KVM case. >> >> While at it, change a 0 to false, amending commit >> 4fdeee7cd4c8f90ef765537b9346a195d9483ab5 (cpu: Move stop field to >> CPUState). >> >> Signed-off-by: Andreas F=C3=A4rber >> --- >> For 1.5 I'm going for the least invasive change here. >> On qom-cpu-10 I'm preparing to replace each CPU loop with qemu_for_ea= ch_cpu(). >> >> cpus.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/cpus.c b/cpus.c >> index a2d92c7..c232265 100644 >> --- a/cpus.c >> +++ b/cpus.c >> @@ -974,9 +974,10 @@ void pause_all_vcpus(void) >> if (qemu_in_vcpu_thread()) { >> cpu_stop_current(); >> if (!kvm_enabled()) { >> + penv =3D first_cpu; >> while (penv) { >> CPUState *pcpu =3D ENV_GET_CPU(penv); >> - pcpu->stop =3D 0; >> + pcpu->stop =3D false; >> pcpu->stopped =3D true; >> penv =3D penv->next_cpu; >> } >> >=20 > Reviewed-by: Jan Kiszka Thanks, applied to qom-cpu: https://github.com/afaerber/qemu-cpu/commits/qom-cpu Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg