From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45295) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkUcY-0001we-Mi for qemu-devel@nongnu.org; Tue, 21 Apr 2015 05:37:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YkUcV-00053o-Ts for qemu-devel@nongnu.org; Tue, 21 Apr 2015 05:37:34 -0400 Received: from static.88-198-71-155.clients.your-server.de ([88.198.71.155]:45862 helo=socrates.bennee.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkUcV-00053h-Oe for qemu-devel@nongnu.org; Tue, 21 Apr 2015 05:37:31 -0400 References: <1428931324-4973-1-git-send-email-peter.maydell@linaro.org> <1428931324-4973-15-git-send-email-peter.maydell@linaro.org> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: <1428931324-4973-15-git-send-email-peter.maydell@linaro.org> Date: Tue, 21 Apr 2015 10:37:55 +0100 Message-ID: <87vbgpvn2k.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v2 14/14] target-arm: Check watchpoints against CPU security state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Peter Crosthwaite , patches@linaro.org, "Edgar E. Iglesias" , qemu-devel@nongnu.org, Greg Bellows , Paolo Bonzini , Richard Henderson Peter Maydell writes: > 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 > Reviewed-by: Edgar E. Iglesias Reviewed-by: Alex Bennée > --- > 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 4a8c4e0..3df9c57 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) { -- Alex Bennée