Thread (14 messages) 14 messages, 3 authors, 2015-03-26
STALE4123d
Revisions (4)
  1. v4 [diff vs current]
  2. v4 [diff vs current]
  3. v5 [diff vs current]
  4. v5 current

[PATCH v5 3/6] hw/intc: arm_gic_kvm.c restore config first

From: Peter Maydell <hidden>
Date: 2015-03-26 17:12:48
Also in: kvm, kvmarm, qemu-devel

On 23 March 2015 at 17:05, Alex Benn?e [off-list ref] wrote:
quoted hunk ↗ jump to hunk
As there is logic to deal with the difference between edge and level
triggered interrupts in the kernel we must ensure it knows the
configuration of the IRQs before we restore the pending state.

Signed-off-by: Alex Benn?e <redacted>
Acked-by: Christoffer Dall <redacted>
diff --git a/hw/intc/arm_gic_kvm.c b/hw/intc/arm_gic_kvm.c
index 0d20750..e2512f1 100644
--- a/hw/intc/arm_gic_kvm.c
+++ b/hw/intc/arm_gic_kvm.c
@@ -370,6 +370,11 @@ static void kvm_arm_gic_put(GICState *s)
      * the appropriate CPU interfaces in the kernel) */
     kvm_dist_put(s, 0x800, 8, s->num_irq, translate_targets);

+    /* irq_state[n].trigger -> GICD_ICFGRn
+     * (restore targets before pending IRQs so we treat level/edge
+     * correctly */
+    kvm_dist_put(s, 0xc00, 2, s->num_irq, translate_trigger);
You don't seem to have acted on Christoffer's query in v4
about this comment...

-- PMM
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help