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

Michael Neuling mikey at neuling.org
Wed Apr 19 15:10:36 AEST 2017


This is now upstream as f257a053df54e2b05c841ee74a1a553143fb67d7


On Thu, 2017-04-13 at 17:43 +1000, Benjamin Herrenschmidt wrote:
> 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;


More information about the Skiboot mailing list