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

Oliver oohall at gmail.com
Thu Dec 7 11:39:05 AEDT 2017


Tested-by: Oliver O'Halloran <oohall at gmail.com>

On Thu, Dec 7, 2017 at 4:39 AM, Benjamin Herrenschmidt
<benh at kernel.crashing.org> wrote:
> 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>
> ---
>  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
>
> _______________________________________________
> Skiboot mailing list
> Skiboot at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/skiboot


More information about the Skiboot mailing list