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 <[email protected]>
---
 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.1.4

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to