From patchwork Fri Sep 30 22:12:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 77192 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp528830qgf; Fri, 30 Sep 2016 15:14:49 -0700 (PDT) X-Received: by 10.55.128.66 with SMTP id b63mr9035866qkd.69.1475273689026; Fri, 30 Sep 2016 15:14:49 -0700 (PDT) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id r68si13519430qkf.260.2016.09.30.15.14.48 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 30 Sep 2016 15:14:48 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:47284 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bq64u-0007bm-Bs for patch@linaro.org; Fri, 30 Sep 2016 18:14:48 -0400 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ZvbMeAZd+zxeLzhvPxEeqbGUIJpRL3sdtr8+MknUfA0=; b=MtJeDBHZGqq887+cEtwHmLvkKjCWxFyyn+QFIs1OO+7JrcE4JQwZ8DZgBFLvFmz1TF kppghdkb/HIanfJMnHAMLlPigGah+M+qTQ9bBF3AOLfsGgZ8FY/4whK56bQLihiv0tt6 EttNwfT5Z5mRVQzakQEzC6Y+0xxxAQA7pz/yU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ZvbMeAZd+zxeLzhvPxEeqbGUIJpRL3sdtr8+MknUfA0=; b=QMToPDbo7A2YhJhhEyHYi0Uc85q43we/nwNfXqmThdGvCC4Rn8oZFIe+XYkPY7Vxw8 xQmP/gG03Jj5hms7a1lQ6R2VILu0wQKlRrgmNIjhQ13YewlM/fRaZSIFxM6/M4F4b1Zi lMvD9IOJMIdcAH5rBOvmwMc/Gwzi7H9aJ1fjqBCdFbNeYQoUKNSNzGFnxP/iP0kRfxbv ead7MuOt7hMfpa9BsLnvyxtiTmYcLauRCWT6Vzv8mI24V8YAAxz2y/FvmnTP43ZIAlkV fVZQQBUfY8ih9Q+nfTWlrtJvhbvi7+sfhlgRncQHp3+UKQ+eKZ9jGitKYoHEmP8730Q4 hhhA== X-Gm-Message-State: AA6/9RlECsmxhH3TghdLRoJ9NFRCe3B6ZJqi7148yQHnHwC9EgTnQ1xHDrPgE/tTkS1D1iQy X-Received: by 10.28.153.11 with SMTP id b11mr5567868wme.94.1475273541330; Fri, 30 Sep 2016 15:12:21 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id xb6sm21626188wjb.30.2016.09.30.15.12.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Sep 2016 15:12:20 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 03F873E00A3; Fri, 30 Sep 2016 23:12:20 +0100 (BST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: pbonzini@redhat.com, qemu-devel@nongnu.org Date: Fri, 30 Sep 2016 23:12:01 +0100 Message-Id: <20160930221201.8431-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20160930213106.20186-14-alex.bennee@linaro.org> References: <20160930213106.20186-14-alex.bennee@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::236 Subject: [Qemu-devel] [PATCH] fixup! tcg: ensure cpu_tb_exec/tb_gen_code use atomic_read/write X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Peter Crosthwaite Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" --- cpu-exec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.9.3 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) {