Received: from eggs.gnu.org ([2001:4830:134:3::10]:57235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bq62c-0006PF-Uu for qemu-devel@nongnu.org; Fri, 30 Sep 2016 18:12:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bq62Y-0005Vp-Nm for qemu-devel@nongnu.org; Fri, 30 Sep 2016 18:12:25 -0400 Received: from mail-wm0-x236.google.com ([2a00:1450:400c:c09::236]:36339) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bq62Y-0005Vb-3V for qemu-devel@nongnu.org; Fri, 30 Sep 2016 18:12:22 -0400 Received: by mail-wm0-x236.google.com with SMTP id k125so50043272wma.1 for ; Fri, 30 Sep 2016 15:12:22 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Fri, 30 Sep 2016 23:12:01 +0100 Message-Id: <20160930221201.8431-1-alex.bennee@linaro.org> In-Reply-To: <20160930213106.20186-14-alex.bennee@linaro.org> References: <20160930213106.20186-14-alex.bennee@linaro.org> Subject: [Qemu-devel] [PATCH] fixup! tcg: ensure cpu_tb_exec/tb_gen_code use atomic_read/write List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: pbonzini@redhat.com, qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Peter Crosthwaite , Richard Henderson --- cpu-exec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpu-exec.c b/cpu-exec.c index 0e6b3d3..8b8be25 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -291,7 +291,8 @@ static inline TranslationBlock *tb_find(CPUState *cpu, is executed. */ cpu_get_tb_cpu_state(env, &pc, &cs_base, &flags); tb = atomic_rcu_read(&cpu->tb_jmp_cache[tb_jmp_cache_hash_func(pc)]); - if (unlikely(!tb || atomic_read(&tb->pc) != pc || atomic_read(&tb->cs_base) != cs_base || + if (unlikely(!tb || atomic_read(&tb->pc) != pc || + atomic_read(&tb->cs_base) != cs_base || atomic_read(&tb->flags) != flags)) { tb = tb_htable_lookup(cpu, pc, cs_base, flags); if (!tb) { -- 2.9.3