From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40609) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZR9jP-0004xY-Ij for qemu-devel@nongnu.org; Sun, 16 Aug 2015 22:01:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZR9jM-00022o-9V for qemu-devel@nongnu.org; Sun, 16 Aug 2015 22:00:59 -0400 Received: from mail-pa0-x22d.google.com ([2607:f8b0:400e:c03::22d]:36005) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZR9jM-00022e-2G for qemu-devel@nongnu.org; Sun, 16 Aug 2015 22:00:56 -0400 Received: by pacum4 with SMTP id um4so11737926pac.3 for ; Sun, 16 Aug 2015 19:00:55 -0700 (PDT) Date: Mon, 17 Aug 2015 03:52:46 +0200 From: "Edgar E. Iglesias" Message-ID: <20150817015246.GG16713@toto> References: <1437751263-21913-1-git-send-email-peter.maydell@linaro.org> <1437751263-21913-4-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1437751263-21913-4-git-send-email-peter.maydell@linaro.org> Subject: Re: [Qemu-devel] [PATCH 3/5] target-arm: Add CP_ACCESS_TRAP_UNCATEGORIZED_EL2, 3 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org, patches@linaro.org On Fri, Jul 24, 2015 at 04:21:01PM +0100, Peter Maydell wrote: > Some coprocessor register access functions need to be able > to report "trap to EL3 with an 'uncategorized' syndrome"; > add the necessary CPAccessResult enum and handling for it. > > I don't currently know of any registers that need to trap > to EL2 with the 'uncategorized' syndrome, but adding the > _EL2 enum as well is trivial and fills in what would > otherwise be an odd gap in the handling. > > Signed-off-by: Peter Maydell Reviewed-by: Edgar E. Iglesias > --- > target-arm/cpu.h | 3 +++ > target-arm/op_helper.c | 8 ++++++++ > 2 files changed, 11 insertions(+) > > diff --git a/target-arm/cpu.h b/target-arm/cpu.h > index 7e89152..685474e 100644 > --- a/target-arm/cpu.h > +++ b/target-arm/cpu.h > @@ -1280,6 +1280,9 @@ typedef enum CPAccessResult { > /* As CP_ACCESS_TRAP, but for traps directly to EL2 or EL3 */ > CP_ACCESS_TRAP_EL2 = 3, > CP_ACCESS_TRAP_EL3 = 4, > + /* As CP_ACCESS_UNCATEGORIZED, but for traps directly to EL2 or EL3 */ > + CP_ACCESS_TRAP_UNCATEGORIZED_EL2 = 5, > + CP_ACCESS_TRAP_UNCATEGORIZED_EL3 = 6, > } CPAccessResult; > > /* Access functions for coprocessor registers. These cannot fail and > diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c > index 663c05d..1425a1d 100644 > --- a/target-arm/op_helper.c > +++ b/target-arm/op_helper.c > @@ -444,6 +444,14 @@ void HELPER(access_check_cp_reg)(CPUARMState *env, void *rip, uint32_t syndrome) > target_el = exception_target_el(env); > syndrome = syn_uncategorized(); > break; > + case CP_ACCESS_TRAP_UNCATEGORIZED_EL2: > + target_el = 2; > + syndrome = syn_uncategorized(); > + break; > + case CP_ACCESS_TRAP_UNCATEGORIZED_EL3: > + target_el = 3; > + syndrome = syn_uncategorized(); > + break; > default: > g_assert_not_reached(); > } > -- > 1.9.1 >