[Skiboot] [PATCH] xive: Fix setting of OPAL_XIVE_IRQ_EOI_VIA_FW

Benjamin Herrenschmidt benh at kernel.crashing.org
Fri Feb 10 16:58:50 AEDT 2017


This flag needs to be set when the original source has an EOI
callback. It indicates that the OS should call back into OPAL
to perform the EOI and is necessary for some LPC interrupts
on DD1. Without this, Linux with XIVE exploitation hangs at
boot with a stuck interrupt.

Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
---
 hw/xive.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/hw/xive.c b/hw/xive.c
index a744c0b..935c57c 100644
--- a/hw/xive.c
+++ b/hw/xive.c
@@ -3268,15 +3268,20 @@ static int64_t opal_xive_get_irq_info(uint32_t girq,
 		return OPAL_PARAMETER;
 	assert(is->ops == &xive_irq_source_ops);
 
-	*out_flags = xive_convert_irq_flags(s->flags);
+	if (out_flags)
+		*out_flags = xive_convert_irq_flags(s->flags);
 
 	/*
 	 * If the orig source has a set_xive callback, then set
 	 * OPAL_XIVE_IRQ_MASK_VIA_FW as masking/unmasking requires
-	 * source specific workarounds.
+	 * source specific workarounds. Same with EOI.
 	 */
-	if (out_flags && s->orig_ops && s->orig_ops->set_xive)
-		*out_flags |= OPAL_XIVE_IRQ_MASK_VIA_FW;
+	if (out_flags && s->orig_ops) {
+		if (s->orig_ops->set_xive)
+			*out_flags |= OPAL_XIVE_IRQ_MASK_VIA_FW;
+		if (s->orig_ops->eoi)
+			*out_flags |= OPAL_XIVE_IRQ_EOI_VIA_FW;
+	}
 
 	idx = girq - s->esb_base;
 




More information about the Skiboot mailing list