From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37650) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfZpW-0001Iz-3h for qemu-devel@nongnu.org; Tue, 07 Apr 2015 16:10:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YfZpV-0008PB-9Q for qemu-devel@nongnu.org; Tue, 07 Apr 2015 16:10:38 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:33323) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfZpU-00084l-RF for qemu-devel@nongnu.org; Tue, 07 Apr 2015 16:10:37 -0400 From: Peter Maydell Date: Tue, 7 Apr 2015 21:10:00 +0100 Message-Id: <1428437400-8474-15-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1428437400-8474-1-git-send-email-peter.maydell@linaro.org> References: <1428437400-8474-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH 14/14] target-arm: Check watchpoints against CPU security state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Crosthwaite , patches@linaro.org, "Edgar E. Iglesias" , Greg Bellows , Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Richard Henderson Fix a TODO in bp_wp_matches() now that we have a function for testing whether the CPU is currently in Secure mode or not. Signed-off-by: Peter Maydell --- target-arm/op_helper.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c index ce09ab3..d8a1054 100644 --- a/target-arm/op_helper.c +++ b/target-arm/op_helper.c @@ -600,8 +600,10 @@ static bool bp_wp_matches(ARMCPU *cpu, int n, bool is_wp) CPUARMState *env = &cpu->env; uint64_t cr; int pac, hmc, ssc, wt, lbn; - /* TODO: check against CPU security state when we implement TrustZone */ - bool is_secure = false; + /* Note that for watchpoints the check is against the CPU security + * state, not the S/NS attribute on the offending data access. + */ + bool is_secure = arm_is_secure(env); int access_el = arm_current_el(env); if (is_wp) { -- 1.9.1