From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38955) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXXOI-0005Ca-OD for qemu-devel@nongnu.org; Wed, 01 May 2013 09:48:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UXXOH-0008G5-MP for qemu-devel@nongnu.org; Wed, 01 May 2013 09:48:14 -0400 Received: from mail-la0-x236.google.com ([2a00:1450:4010:c03::236]:41969) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXXOH-0008Fp-Fc for qemu-devel@nongnu.org; Wed, 01 May 2013 09:48:13 -0400 Received: by mail-la0-f54.google.com with SMTP id fm20so1305673lab.41 for ; Wed, 01 May 2013 06:48:12 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <51811995.1010409@suse.de> References: <51811995.1010409@suse.de> From: Peter Maydell Date: Wed, 1 May 2013 14:47:52 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] pause_all_vcpus() TCG bug? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Andreas_F=C3=A4rber?= Cc: Jan Kiszka , qemu-devel , =?UTF-8?B?6Zmz6Z+L5Lu7?= On 1 May 2013 14:33, Andreas F=C3=A4rber wrote: > Hello, > > This is today's function, with annotations and question inline: > > void pause_all_vcpus(void) > { > CPUArchState *penv =3D first_cpu; > > qemu_clock_enable(vm_clock, false); > while (penv) { > CPUState *pcpu =3D ENV_GET_CPU(penv); > pcpu->stop =3D true; > qemu_cpu_kick(pcpu); > penv =3D penv->next_cpu; > } > > /* So, at this point penv =3D=3D NULL. */ > > if (qemu_in_vcpu_thread()) { > cpu_stop_current(); > if (!kvm_enabled()) { > while (penv) { > > /* Looks like this can never be true then? */ > /* Is penv =3D first_cpu; missing? */ > > CPUState *pcpu =3D ENV_GET_CPU(penv); > pcpu->stop =3D 0; > > /* 0 instead of false may hint at a mismerge... */ > > pcpu->stopped =3D true; > penv =3D penv->next_cpu; > } > return; > } > } This certainly looks odd. This bug seems to have been present since this patch was first committed (d798e9745, January last year, by Jan.) -- PMM