From e24bab3f5e70d877d470659569f22e2838813d0f Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Thu, 16 Jun 2016 16:28:19 +0200 Subject: [PATCH] arm: Enable maintenance interrupt also from irqchip_set_pending 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 --- hypervisor/arch/arm/irqchip.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hypervisor/arch/arm/irqchip.c b/hypervisor/arch/arm/irqchip.c index bec3d95..7f81eb8 100644 --- a/hypervisor/arch/arm/irqchip.c +++ b/hypervisor/arch/arm/irqchip.c @@ -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) -- 2.39.2