From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52907) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXqXA-0003eY-2W for qemu-devel@nongnu.org; Thu, 02 May 2013 06:14:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UXqX8-0004GU-NO for qemu-devel@nongnu.org; Thu, 02 May 2013 06:14:40 -0400 Received: from goliath.siemens.de ([192.35.17.28]:31234) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXqX8-0004Fz-E0 for qemu-devel@nongnu.org; Thu, 02 May 2013 06:14:38 -0400 Message-ID: <51823C8B.3060102@siemens.com> Date: Thu, 02 May 2013 12:14:35 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1367488340-14782-1-git-send-email-afaerber@suse.de> In-Reply-To: <1367488340-14782-1-git-send-email-afaerber@suse.de> 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: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= Cc: "peter.maydell@linaro.org" , "qemu-devel@nongnu.org" 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 us= e > pause_all_vcpus from VCPU context) for non-KVM case. >=20 > While at it, change a 0 to false, amending commit > 4fdeee7cd4c8f90ef765537b9346a195d9483ab5 (cpu: Move stop field to > CPUState). >=20 > 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_eac= h_cpu(). >=20 > cpus.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > 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, Jan --=20 Siemens AG, Corporate Technology, CT RTC ITP SDP-DE Corporate Competence Center Embedded Linux