]> rtime.felk.cvut.cz Git - jailhouse.git/commitdiff
arm: Enable maintenance interrupt also from irqchip_set_pending
authorJan Kiszka <jan.kiszka@siemens.com>
Thu, 16 Jun 2016 14:28:19 +0000 (16:28 +0200)
committerJan Kiszka <jan.kiszka@siemens.com>
Thu, 16 Jun 2016 16:41:13 +0000 (18:41 +0200)
In case we set an interrupt pending for the local CPU and cannot queue
it with the hardware, make sure the maintenance interrupt is on.
Otherwise, we risk to delay guest interrupts or cause the guest to get
stuck.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
hypervisor/arch/arm/irqchip.c

index bec3d956937eaef47a3294eb0ce448c7995655a0..7f81eb8ea2dfc81ee66387f05bd14920dac67e69 100644 (file)
@@ -73,6 +73,14 @@ void irqchip_set_pending(struct per_cpu *cpu_data, u16 irq_id)
        }
 
        spin_unlock(&cpu_data->pending_irqs_lock);
+
+       /*
+        * The list registers are full, trigger maintenance interrupt if we are
+        * on the target CPU. In the other case, the caller will send a
+        * SGI_INJECT, and irqchip_inject_pending will take care.
+        */
+       if (local_injection)
+               irqchip.enable_maint_irq(true);
 }
 
 void irqchip_inject_pending(struct per_cpu *cpu_data)