From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54806) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yxxun-0004wC-T4 for qemu-devel@nongnu.org; Thu, 28 May 2015 09:32:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yxxuf-00005i-6u for qemu-devel@nongnu.org; Thu, 28 May 2015 09:32:05 -0400 Received: from mail-bn1on0092.outbound.protection.outlook.com ([157.56.110.92]:63856 helo=na01-bn1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yxxuf-00005e-1m for qemu-devel@nongnu.org; Thu, 28 May 2015 09:31:57 -0400 Date: Thu, 28 May 2015 23:27:54 +1000 From: "Edgar E. Iglesias" Message-ID: <20150528132753.GM27042@toto> References: <1432060414-5195-1-git-send-email-peter.maydell@linaro.org> <1432060414-5195-12-git-send-email-peter.maydell@linaro.org> <20150528125035.GL27042@toto> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH 11/14] target-arm: Extend FP checks to use an EL List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Alexander Graf , Sergey Fedorov , Alex =?iso-8859-1?Q?Benn=E9e?= , QEMU Developers , Patch Tracking On Thu, May 28, 2015 at 02:19:42PM +0100, Peter Maydell wrote: > On 28 May 2015 at 13:50, Edgar E. Iglesias wrote: > > On Tue, May 19, 2015 at 07:33:31PM +0100, Peter Maydell wrote: > >> + /* For the CPTR registers we don't need to guard with an ARM_FEATURE > >> + * check because zero bits in the registers mean "don't trap". > >> + */ > >> + > >> + /* CPTR_EL2 : present in v7VE or v8 */ > >> + if (cur_el <= 2 && extract32(env->cp15.cptr_el[2], 10, 1) > >> + && arm_is_secure_below_el3(env)) { > > > > I think this should be !arm_is_secure_below_el3(env) > > Yes. > > > Also the ARMv7 manual, the part describing CPACR cpn bits, indicates that > > HCTPR has prio over CPACR. I didn't find any thing like that for > > ARMv8... There might be a difference between v8/v7 here, do you know? > > For v8, this is described in "G1.11.2 Exception priority order" I think: > exceptions taken to EL1 because of configurable access to insns > are item 8, which has higher priority than HCPTR traps (item 10). > This matches the code I have in this patch. > > I believe that v7 is the same, and the v7 ARM ARM is just slightly > confusingly worded. The HCPTR documentation says that setting TCPn > to 1 traps "any otherwise-valid Non-secure access to CPn". The > CheckAdvSIMDOrVFPEnabled() pseudocode also clearly checks CPACR > first and HCPTR second. Thanks for clarifying that. With the !arm_is_secure_below_el3(env) change: Reviewed-by: Edgar E. Iglesias Cheers, Edgar