[Skiboot] [PATCH v2 1/5] xive: Mark a freed IRQ's IVE as valid and masked

Benjamin Herrenschmidt benh at kernel.crashing.org
Tue Dec 12 16:22:51 AEDT 2017


Removing the valid bit means a FIR will trip if it's accessed
inadvertently. Under some circumstances, the XIVE will speculatively
access an IVE for a masked interrupt and trip it. So make sure that
freed entries are still marked valid (but masked).

Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
Tested-by: Oliver O'Halloran <oohall at gmail.com>
---
 hw/xive.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/xive.c b/hw/xive.c
index e9aa030d..364be549 100644
--- a/hw/xive.c
+++ b/hw/xive.c
@@ -5116,7 +5116,7 @@ static int64_t opal_xive_free_irq(uint32_t girq)
 	xive_update_irq_mask(s, girq - s->esb_base, true);
 
 	/* Mark the IVE masked and invalid */
-	ive->w = IVE_MASKED;
+	ive->w = IVE_MASKED | IVE_VALID;
 	xive_ivc_scrub(x, x->block_id, idx);
 
 	/* Free it */
-- 
2.14.3



More information about the Skiboot mailing list