[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 03/16] target-arm: A64: Respect SPSEL when taking
From: |
Edgar E. Iglesias |
Subject: |
[Qemu-devel] [PATCH v3 03/16] target-arm: A64: Respect SPSEL when taking exceptions |
Date: |
Tue, 17 Jun 2014 18:45:33 +1000 |
From: "Edgar E. Iglesias" <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Signed-off-by: Edgar E. Iglesias <address@hidden>
---
target-arm/helper-a64.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target-arm/helper-a64.c b/target-arm/helper-a64.c
index 2b4ce6a..027434a 100644
--- a/target-arm/helper-a64.c
+++ b/target-arm/helper-a64.c
@@ -489,8 +489,7 @@ void aarch64_cpu_do_interrupt(CPUState *cs)
if (is_a64(env)) {
env->banked_spsr[aarch64_banked_spsr_index(1)] = pstate_read(env);
- env->sp_el[arm_current_pl(env)] = env->xregs[31];
- env->xregs[31] = env->sp_el[1];
+ aarch64_save_sp(env, arm_current_pl(env));
env->elr_el[1] = env->pc;
} else {
env->banked_spsr[0] = cpsr_read(env);
@@ -508,6 +507,7 @@ void aarch64_cpu_do_interrupt(CPUState *cs)
pstate_write(env, PSTATE_DAIF | PSTATE_MODE_EL1h);
env->aarch64 = 1;
+ aarch64_restore_sp(env, 1);
env->pc = addr;
cs->interrupt_request |= CPU_INTERRUPT_EXITTB;
--
1.8.3.2
- [Qemu-devel] [PATCH v3 00/16] target-arm: Parts of the AArch64 EL2/3 exception model, Edgar E. Iglesias, 2014/06/17
- [Qemu-devel] [PATCH v3 01/16] target-arm: A64: Break out aarch64_save/restore_sp, Edgar E. Iglesias, 2014/06/17
- [Qemu-devel] [PATCH v3 02/16] target-arm: A64: Respect SPSEL in ERET SP restore, Edgar E. Iglesias, 2014/06/17
- [Qemu-devel] [PATCH v3 03/16] target-arm: A64: Respect SPSEL when taking exceptions,
Edgar E. Iglesias <=
- [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, 2014/06/17