From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43900) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgAn7-00014r-Sw for qemu-devel@nongnu.org; Thu, 09 Apr 2015 07:38:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YgAn4-00035W-Kd for qemu-devel@nongnu.org; Thu, 09 Apr 2015 07:38:37 -0400 Received: from mail-pd0-x22c.google.com ([2607:f8b0:400e:c02::22c]:34333) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgAn4-00034y-EW for qemu-devel@nongnu.org; Thu, 09 Apr 2015 07:38:34 -0400 Received: by pdbqa5 with SMTP id qa5so93075070pdb.1 for ; Thu, 09 Apr 2015 04:38:33 -0700 (PDT) Date: Thu, 9 Apr 2015 21:38:28 +1000 From: "Edgar E. Iglesias" Message-ID: <20150409113828.GN30629@toto> References: <1428437400-8474-1-git-send-email-peter.maydell@linaro.org> <1428437400-8474-15-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1428437400-8474-15-git-send-email-peter.maydell@linaro.org> Subject: Re: [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: Peter Maydell Cc: Peter Crosthwaite , patches@linaro.org, qemu-devel@nongnu.org, Greg Bellows , Paolo Bonzini , Alex =?iso-8859-1?Q?Benn=E9e?= , Richard Henderson On Tue, Apr 07, 2015 at 09:10:00PM +0100, Peter Maydell wrote: > 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 > --- > 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 >