Received: from eggs.gnu.org ([2001:4830:134:3::10]:51066) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0utK-0000rT-HY for qemu-devel@nongnu.org; Thu, 12 May 2016 13:59:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0utI-0005vz-Bm for qemu-devel@nongnu.org; Thu, 12 May 2016 13:59:17 -0400 From: =?utf-8?Q?Llu=C3=ADs_Vilanova?= References: <146299653361.5203.4475655460859700214.stgit@localhost> <146299653947.5203.13161479377215549869.stgit@localhost> <57346C4D.20006@redhat.com> Date: Thu, 12 May 2016 18:27:27 +0200 In-Reply-To: <57346C4D.20006@redhat.com> (Paolo Bonzini's message of "Thu, 12 May 2016 13:43:09 +0200") Message-ID: <8760ujnswg.fsf@fimbulvetr.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 1/2] exec: [tcg] Track which vCPU is performing translation and execution List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, Peter Maydell , Eduardo Habkost , Peter Crosthwaite , Jia Liu , Anthony Green , Mark Cave-Ayland , Alexander Graf , Blue Swirl , Max Filippov , Michael Walle , "open list:ARM" , "open list:PowerPC" , Stefan Hajnoczi , Bastian Koppelmann , "Edgar E. Iglesias" , Guan Xuetao , Leon Alrae , Aurelien Jarno , Richard Henderson Paolo Bonzini writes: > On 11/05/2016 21:55, Llu=C3=ADs Vilanova wrote: >>=20 >> diff --git a/translate-all.c b/translate-all.c >> index 8329ea6..1c16b14 100644 >> --- a/translate-all.c >> +++ b/translate-all.c >> @@ -1092,6 +1092,8 @@ TranslationBlock *tb_gen_code(CPUState *cpu, >> ti =3D profile_getclock(); >> #endif >>=20 >> + tcg_ctx.cpu =3D ENV_GET_CPU(env); >> + >> tcg_func_start(&tcg_ctx); >>=20 >> gen_intermediate_code(env, tb); >>=20 > I prefer to also set this to NULL outside translation. Do you mean after the call to gen_intermediate_code()? Cheers, Lluis