From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35436) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGUX4-0001Ox-W4 for qemu-devel@nongnu.org; Wed, 28 Jan 2015 10:27:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGUWy-0002Wa-OK for qemu-devel@nongnu.org; Wed, 28 Jan 2015 10:27:54 -0500 Received: from greensocs.com ([193.104.36.180]:38610) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGUWy-0002Vx-G4 for qemu-devel@nongnu.org; Wed, 28 Jan 2015 10:27:48 -0500 Message-ID: <54C8FFF1.8090605@greensocs.com> Date: Wed, 28 Jan 2015 16:27:45 +0100 From: Frederic Konrad MIME-Version: 1.0 References: <54C8FA7B.3050501@greensocs.com> <54C8FD7C.8040907@redhat.com> In-Reply-To: <54C8FD7C.8040907@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Thread local TCGContext. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel , mttcg@listserver.greensocs.com Cc: Peter Maydell , Mark Burton On 28/01/2015 16:17, Paolo Bonzini wrote: > > On 28/01/2015 16:04, Frederic Konrad wrote: >> >> /* code generation context */ >> -TCGContext tcg_ctx; >> +__thread TCGContext tcg_ctx; >> >> But the big problem is the initialisation, it's done only onetime in the >> iothread with >> the accelerator.. > You need to move it to qemu_tcg_cpu_thread_fn. > > Paolo > Ok that makes sense. I thought it won't be possible because it seems to be initialized by a class but probably qemu_tcg_cpu_thread_fn exists only when the accelerator is tcg. Thanks, Fred