[Skiboot] [PATCH] xive: Clear emulation mode queue on reset

Benjamin Herrenschmidt benh at kernel.crashing.org
Thu Apr 13 17:43:32 AEST 2017


When resetting, we need to clear the emulation mode queue
for each CPU, otherwise it may contain "stale" interrupts
causing the OS to go completely out of sync.

This fixes problems doing kexecs from emulation to native
back to emulation.

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

diff --git a/hw/xive.c b/hw/xive.c
index d76f4cf..530e0df 100644
--- a/hw/xive.c
+++ b/hw/xive.c
@@ -2873,6 +2873,7 @@ static void xive_init_cpu_emulation(struct xive_cpu_state *xs,
 	xs->eqbuf = xive_get_eq_buf(xs->vp_blk,
 				    xs->eq_idx + XIVE_EMULATION_PRIO);
 	assert(xs->eqbuf);
+	memset(xs->eqbuf, 0, 0x10000);
 
 	xs->eqptr = 0;
 	xs->eqmsk = (0x10000/4) - 1;
-- 
2.9.3



More information about the Skiboot mailing list