Skip to contentSkip to conversation

target-arm queue

GIT PULL Applied Peter Maydell 1 participant 5 messages Nov 19, 2015

lore
Share & tools
lore
#0 lore raw

Just three fairly small bugfixes...

-- PMM

The following changes since commit 8f280309030331a912fd8924c129d8bd59e1bdc7:

Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2015-11-18 17:07:24 +0000)

are available in the git repository at:

git://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20151119

for you to fetch changes up to ce8a1b5449cd8c4c2831abb581d3208c3a3745a0:

target-arm: Update condexec before arch BP check in AA32 translation (2015-11-19 12:51:08 +0000)

----------------------------------------------------------------
target-arm queue:
* add missing condexec updates when emulating architectural breakpoints and coprocessor access checks in Thumb translation (could in theory cause problems when these happened inside a Thumb IT block and an exception was taken)
* arm_gic: correctly restore nested IRQ priority

----------------------------------------------------------------
François Baldassari (1):
hw/arm_gic: Correctly restore nested irq priority

Sergey Fedorov (2):
target-arm: Update condexec before CP access check in AA32 translation
target-arm: Update condexec before arch BP check in AA32 translation

 hw/intc/arm_gic.c      | 4 ++--
 target-arm/translate.c | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)
#1 lore raw

[Qemu-devel] [PULL 2/3] target-arm: Update condexec before CP access check in AA32 translation

From: Sergey Fedorov <[email protected]>

Coprocessor access instructions are allowed inside IT block. gen_helper_access_check_cp_reg() can raise an exceptions thus condexec bits should be updated before.

Message-id: [email protected]

---
 target-arm/translate.c | 1 +
 1 file changed, 1 insertion(+)
target-arm/translate.c +1 -0
index 4351854..739f373 100644
@@ -7210,6 +7210,7 @@ static int disas_coproc_insn(DisasContext *s, uint32_t insn)
                 break;
             }
 
+            gen_set_condexec(s);
             gen_set_pc_im(s, s->pc - 4);
             tmpptr = tcg_const_ptr(ri);
             tcg_syn = tcg_const_i32(syndrome);
Signature · 1 line
1.9.1
#2 lore raw

[Qemu-devel] [PULL 1/3] hw/arm_gic: Correctly restore nested irq priority

In reply to Peter Maydell

From: François Baldassari <[email protected]>

Upon activating an interrupt, set the corresponding priority bit in the APR/NSAPR registers without touching the currently set bits. In the event of nested interrupts, the GIC will then have the information it needs to restore the priority of the pre-empted interrupt once the higher priority interrupt finishes execution.

---
 hw/intc/arm_gic.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/intc/arm_gic.c +2 -2
index d71aeb8..13e297d 100644
@@ -254,9 +254,9 @@ static void gic_activate_irq(GICState *s, int cpu, int irq)
     int bitno = preemption_level % 32;
 
     if (gic_has_groups(s) && GIC_TEST_GROUP(irq, (1 << cpu))) {
-        s->nsapr[regno][cpu] &= (1 << bitno);
+        s->nsapr[regno][cpu] |= (1 << bitno);
     } else {
-        s->apr[regno][cpu] &= (1 << bitno);
+        s->apr[regno][cpu] |= (1 << bitno);
     }
 
     s->running_priority[cpu] = prio;
Signature · 1 line
1.9.1
#3 lore raw

[Qemu-devel] [PULL 3/3] target-arm: Update condexec before arch BP check in AA32 translation

In reply to Peter Maydell

From: Sergey Fedorov <[email protected]>

Architectural breakpoint check could raise an exceptions, thus condexec bits should be updated before calling gen_helper_check_breakpoints().

Message-id: [email protected]

---
 target-arm/translate.c | 1 +
 1 file changed, 1 insertion(+)
target-arm/translate.c +1 -0
index 739f373..5d22879 100644
@@ -11374,6 +11374,7 @@ void gen_intermediate_code(CPUARMState *env, TranslationBlock *tb)
             QTAILQ_FOREACH(bp, &cs->breakpoints, entry) {
                 if (bp->pc == dc->pc) {
                     if (bp->flags & BP_CPU) {
+                        gen_set_condexec(dc);
                         gen_set_pc_im(dc, dc->pc);
                         gen_helper_check_breakpoints(cpu_env);
                         /* End the TB early; it's likely not going to be executed */
Signature · 1 line
1.9.1
author Applied
#4 lore raw
In reply to Peter Maydell
Quoted 18 lines · Peter Maydell

Just three fairly small bugfixes...

-- PMM

The following changes since commit 8f280309030331a912fd8924c129d8bd59e1bdc7:

Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2015-11-18 17:07:24 +0000)

are available in the git repository at:

git://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20151119

for you to fetch changes up to ce8a1b5449cd8c4c2831abb581d3208c3a3745a0:

target-arm: Update condexec before arch BP check in AA32 translation (2015-11-19 12:51:08 +0000)

Quoted 8 lines

----------------------------------------------------------------
target-arm queue:
* add missing condexec updates when emulating architectural breakpoints and coprocessor access checks in Thumb translation (could in theory cause problems when these happened inside a Thumb IT block and an exception was taken)
* arm_gic: correctly restore nested IRQ priority

Applied, thanks.

-- PMM