|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH-4.5 4/4] xen/arm: set GICH_HCR_NPIE if all the LRs are in use
On return to guest, if there are no free LRs and we still have more
interrupt to inject, set GICH_HCR_NPIE so that we are going to receive a
maintenance interrupt when no pending interrupts are present in the LR
registers.
The maintenance interrupt handler won't do anything anymore, but
receiving the interrupt is going to cause gic_inject to be called on
return to guest that is going to clear the old LRs and inject new
interrupts.
Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
---
xen/arch/arm/gic.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
index 87bd5d3..bee2618 100644
--- a/xen/arch/arm/gic.c
+++ b/xen/arch/arm/gic.c
@@ -810,8 +810,14 @@ void gic_inject(void)
gic_restore_pending_irqs(current);
if (!gic_events_need_delivery())
gic_inject_irq_stop();
- else
+ else {
gic_inject_irq_start();
+ }
+
+ if ( !list_empty(¤t->arch.vgic.lr_pending) )
+ GICH[GICH_HCR] = GICH_HCR_EN | GICH_HCR_NPIE;
+ else
+ GICH[GICH_HCR] = GICH_HCR_EN;
}
int gic_route_irq_to_guest(struct domain *d, const struct dt_irq *irq,
--
1.7.10.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |