From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46899) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPs8k-0002nx-1t for qemu-devel@nongnu.org; Thu, 13 Aug 2015 09:01:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZPs8g-00043P-Bt for qemu-devel@nongnu.org; Thu, 13 Aug 2015 09:01:49 -0400 Received: from mx6-phx2.redhat.com ([209.132.183.39]:34018) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPs8g-00042N-4A for qemu-devel@nongnu.org; Thu, 13 Aug 2015 09:01:46 -0400 Date: Thu, 13 Aug 2015 09:01:41 -0400 (EDT) From: Paolo Bonzini Message-ID: <947372426.11934530.1439470901539.JavaMail.zimbra@redhat.com> In-Reply-To: <55CC9422.3070602@greensocs.com> References: <1439397664-70734-1-git-send-email-pbonzini@redhat.com> <1439397664-70734-13-git-send-email-pbonzini@redhat.com> <55CC9422.3070602@greensocs.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 12/10] tcg: protect TBContext with tb_lock. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Frederic Konrad Cc: mttcg@greensocs.com, qemu-devel@nongnu.org > > + tb_lock(); > > tb = tb_gen_code(cpu, orig_tb->pc, orig_tb->cs_base, orig_tb->flags, > > max_cycles | CF_NOCACHE); > > tb_gen_code() calls tb_alloc() which calls tb_flush() we end in a double > tb_lock here. > But that's probably not really important here as we want to either do a > tb_flush outside cpu_exec or realloc an other code buffer. You're right! Honestly I haven't tested tb_flush() at all with these patches since it's documented as broken with multiple threads. Luckily the bug is not in the first 10 patches. :) Paolo