From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39017) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsQd9-0001sl-Sv for qemu-devel@nongnu.org; Wed, 13 May 2015 02:59:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YsQd5-0000rP-NY for qemu-devel@nongnu.org; Wed, 13 May 2015 02:58:59 -0400 Received: from mail-oi0-x22d.google.com ([2607:f8b0:4003:c06::22d]:36491) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsQd5-0000rK-Hr for qemu-devel@nongnu.org; Wed, 13 May 2015 02:58:55 -0400 Received: by oift201 with SMTP id t201so24219854oif.3 for ; Tue, 12 May 2015 23:58:55 -0700 (PDT) From: "Edgar E. Iglesias" Date: Wed, 13 May 2015 16:52:29 +1000 Message-Id: <1431499963-1019-5-git-send-email-edgar.iglesias@gmail.com> In-Reply-To: <1431499963-1019-1-git-send-email-edgar.iglesias@gmail.com> References: <1431499963-1019-1-git-send-email-edgar.iglesias@gmail.com> Subject: [Qemu-devel] [PATCH v1 04/18] target-arm: Route timer access traps to EL1 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, peter.maydell@linaro.org Cc: edgar.iglesias@xilinx.com, serge.fdrv@gmail.com, alex.bennee@linaro.org, agraf@suse.de, greg.bellows@linaro.org From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- target-arm/helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target-arm/helper.c b/target-arm/helper.c index a4bab78..d849b30 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -1147,6 +1147,7 @@ static CPAccessResult gt_cntfrq_access(CPUARMState *env, const ARMCPRegInfo *ri) { /* CNTFRQ: not visible from PL0 if both PL0PCTEN and PL0VCTEN are zero */ if (arm_current_el(env) == 0 && !extract32(env->cp15.c14_cntkctl, 0, 2)) { + env->exception.target_el = 1; return CP_ACCESS_TRAP; } return CP_ACCESS_OK; @@ -1157,6 +1158,7 @@ static CPAccessResult gt_counter_access(CPUARMState *env, int timeridx) /* CNT[PV]CT: not visible from PL0 if ELO[PV]CTEN is zero */ if (arm_current_el(env) == 0 && !extract32(env->cp15.c14_cntkctl, timeridx, 1)) { + env->exception.target_el = 1; return CP_ACCESS_TRAP; } return CP_ACCESS_OK; @@ -1169,6 +1171,7 @@ static CPAccessResult gt_timer_access(CPUARMState *env, int timeridx) */ if (arm_current_el(env) == 0 && !extract32(env->cp15.c14_cntkctl, 9 - timeridx, 1)) { + env->exception.target_el = 1; return CP_ACCESS_TRAP; } return CP_ACCESS_OK; -- 1.9.1