target-arm: Add a Hypervisor Trap exception type
authorEdgar E. Iglesias <edgar.iglesias@xilinx.com>
Mon, 29 Sep 2014 17:48:50 +0000 (18:48 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 29 Sep 2014 17:48:50 +0000 (18:48 +0100)
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1411718914-6608-9-git-send-email-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target-arm/cpu.h
target-arm/helper-a64.c
target-arm/helper.c
target-arm/internals.h

index e13b6d4baa98311b9202cba8a75b0e0dd95d8346..98610f03522b91a6ee4a3b41ee28d94015f24a39 100644 (file)
@@ -52,6 +52,7 @@
 #define EXCP_KERNEL_TRAP     9   /* Jumped to kernel code page.  */
 #define EXCP_STREX          10
 #define EXCP_HVC            11   /* HyperVisor Call */
+#define EXCP_HYP_TRAP       12
 
 #define ARMV7M_EXCP_RESET   1
 #define ARMV7M_EXCP_NMI     2
index 4e6ca2631c20bb4d948b9f26f7718b9bf2658952..0a7c155bb84a1fc877902de1e9b67e90e8258af8 100644 (file)
@@ -477,6 +477,7 @@ void aarch64_cpu_do_interrupt(CPUState *cs)
     case EXCP_UDEF:
     case EXCP_SWI:
     case EXCP_HVC:
+    case EXCP_HYP_TRAP:
         env->cp15.esr_el[new_el] = env->exception.syndrome;
         break;
     case EXCP_IRQ:
index 4d5a65329cb8c44874530106b61a042c82772075..48f549af6616fc3ee55aafa498cf6856e1388509 100644 (file)
@@ -3781,6 +3781,7 @@ unsigned int arm_excp_target_el(CPUState *cs, unsigned int excp_idx)
 
     switch (excp_idx) {
     case EXCP_HVC:
+    case EXCP_HYP_TRAP:
         target_el = 2;
         break;
     default:
index 25c5ec37d0a844f197d0c5055795adced0cc326a..203c423be74701adf03d402304882a3a79bf787e 100644 (file)
@@ -54,6 +54,7 @@ static const char * const excnames[] = {
     [EXCP_KERNEL_TRAP] = "QEMU intercept of kernel commpage",
     [EXCP_STREX] = "QEMU intercept of STREX",
     [EXCP_HVC] = "Hypervisor Call",
+    [EXCP_HYP_TRAP] = "Hypervisor Trap",
 };
 
 static inline void arm_log_exception(int idx)