qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 11/17] target-arm: Don't take interrupts targ


From: Greg Bellows
Subject: Re: [Qemu-devel] [PATCH v2 11/17] target-arm: Don't take interrupts targeting lower ELs
Date: Wed, 11 Jun 2014 12:17:28 -0500

Reviewed-by: Greg Bellows <address@hidden>


On 9 June 2014 10:04, Edgar E. Iglesias <address@hidden> wrote:
From: "Edgar E. Iglesias" <address@hidden>

Reviewed-by: Alex Bennée <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 2f262a5..6aed57c 100644
--- a/target-arm/cpu.h
+++ b/target-arm/cpu.h
@@ -1129,6 +1129,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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]