From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34962) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5Wl1-0006Dh-5g for qemu-devel@nongnu.org; Thu, 18 Jun 2015 06:09:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5Wkx-0007HY-UH for qemu-devel@nongnu.org; Thu, 18 Jun 2015 06:09:15 -0400 Received: from mail-lb0-x232.google.com ([2a00:1450:4010:c04::232]:33168) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5Wkx-0007HL-ME for qemu-devel@nongnu.org; Thu, 18 Jun 2015 06:09:11 -0400 Received: by lbbvz5 with SMTP id vz5so870493lbb.0 for ; Thu, 18 Jun 2015 03:09:11 -0700 (PDT) Message-ID: <558298C5.50501@gmail.com> Date: Thu, 18 Jun 2015 13:09:09 +0300 From: Sergey Fedorov MIME-Version: 1.0 References: <1434563686-16744-1-git-send-email-serge.fdrv@gmail.com> <55826BE1.9090804@redhat.com> In-Reply-To: <55826BE1.9090804@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] cpu-exec: Do not invalidate original TB in cpu_exec_nocache() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org Cc: Pavel Dovgalyuk On 18.06.2015 09:57, Paolo Bonzini wrote: > On 17/06/2015 19:54, Sergey Fedorov wrote: >> >> - /* tb_gen_code can flush our orig_tb, invalidate it now */ >> - tb_phys_invalidate(orig_tb, -1); >> - tb = tb_gen_code(cpu, pc, cs_base, flags, >> + tb = tb_gen_code(cpu, orig_tb->pc, orig_tb->cs_base, orig_tb->flags, >> max_cycles | CF_NOCACHE); >> + tb->orig_tb = orig_tb; > What happens here if tb_gen_code calls tb_flush? > > Paolo I think I understand. Did you mean tcg_ctx.tb_ctx.tb_invalidated_flag should be checked here? Sergey