[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 11/16] target-arm: Don't take interrupts targetin
From: |
Edgar E. Iglesias |
Subject: |
[Qemu-devel] [PATCH v3 11/16] target-arm: Don't take interrupts targeting lower ELs |
Date: |
Tue, 17 Jun 2014 18:45:41 +1000 |
From: "Edgar E. Iglesias" <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Reviewed-by: Greg Bellows <address@hidden>
Signed-off-by: Edgar E. Iglesias <address@hidden>
---
target-arm/cpu.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/target-arm/cpu.h b/target-arm/cpu.h
index 9d21361..4f273ac 100644
--- a/target-arm/cpu.h
+++ b/target-arm/cpu.h
@@ -1132,6 +1132,13 @@ bool write_cpustate_to_list(ARMCPU *cpu);
static inline bool arm_excp_unmasked(CPUState *cs, unsigned int excp_idx)
{
CPUARMState *env = cs->env_ptr;
+ unsigned int cur_el = arm_current_pl(env);
+ unsigned int target_el = arm_excp_target_el(cs, excp_idx);
+
+ /* Don't take exceptions if they target a lower EL. */
+ if (cur_el > target_el) {
+ return false;
+ }
switch (excp_idx) {
case EXCP_FIQ:
--
1.8.3.2
- [Qemu-devel] [PATCH v3 03/16] target-arm: A64: Respect SPSEL when taking exceptions, (continued)
- [Qemu-devel] [PATCH v3 03/16] target-arm: A64: Respect SPSEL when taking exceptions, Edgar E. Iglesias, 2014/06/17
- [Qemu-devel] [PATCH v3 04/16] target-arm: Make far_el1 an array, Edgar E. Iglesias, 2014/06/17
- [Qemu-devel] [PATCH v3 05/16] target-arm: Add ESR_EL2 and 3, Edgar E. Iglesias, 2014/06/17
- [Qemu-devel] [PATCH v3 06/16] target-arm: Add FAR_EL2 and 3, Edgar E. Iglesias, 2014/06/17
- [Qemu-devel] [PATCH v3 07/16] target-arm: Add HCR_EL2, Edgar E. Iglesias, 2014/06/17
- [Qemu-devel] [PATCH v3 08/16] target-arm: Add SCR_EL3, Edgar E. Iglesias, 2014/06/17
- [Qemu-devel] [PATCH v3 09/16] target-arm: A64: Refactor aarch64_cpu_do_interrupt, Edgar E. Iglesias, 2014/06/17
- [Qemu-devel] [PATCH v3 10/16] target-arm: Break out exception masking to a separate func, Edgar E. Iglesias, 2014/06/17
- [Qemu-devel] [PATCH v3 11/16] target-arm: Don't take interrupts targeting lower ELs,
Edgar E. Iglesias <=
- [Qemu-devel] [PATCH v3 12/16] target-arm: A64: Correct updates to FAR and ESR on exceptions, Edgar E. Iglesias, 2014/06/17
- [Qemu-devel] [PATCH v3 13/16] target-arm: A64: Emulate the HVC insn, Edgar E. Iglesias, 2014/06/17
- [Qemu-devel] [PATCH v3 14/16] target-arm: A64: Emulate the SMC insn, Edgar E. Iglesias, 2014/06/17
- [Qemu-devel] [PATCH v3 15/16] target-arm: Add IRQ and FIQ routing to EL2 and 3, Edgar E. Iglesias, 2014/06/17
- [Qemu-devel] [PATCH v3 16/16] target-arm: Add support for VIRQ and VFIQ, Edgar E. Iglesias, 2014/06/17
- Re: [Qemu-devel] [PATCH v3 00/16] target-arm: Parts of the AArch64 EL2/3 exception model, Greg Bellows, 2014/06/23