Re: [PATCH 3/3] arm64: tlb: skip tlbi broadcast

From: Andrea Arcangeli
Date: Wed Apr 01 2020 - 06:37:42 EST


Hello Mark,

On Tue, Mar 31, 2020 at 10:45:11AM +0100, Mark Rutland wrote:
> Hi Andrea,
>
> On Mon, Mar 16, 2020 at 02:09:07PM +0000, Mark Rutland wrote:
> > AFAICT, this series relies on:
> >
> > * An ISB completing prior page table walks when updating TTBR. I don't
> > believe this is necessarily the case, given how things work for an
> > EL1->EL2 transition where there can be ongoing EL1 walks.
>
> I've had confirmation that a DSB is necessary (after the MSR and ISB) to
> complete any ongoing translation table walks for the stale context.
>
> Without a DSB, those walks can observe subsequent stores and encounter
> the usual set of CONSTRAINED UNPREDICTABLE behaviours (e.g. walking into
> MMIO with side-effects, continuing from amalgamted entries, etc). Those
> issues are purely to do with the walk, and apply regardless of whether
> the resulting translations are architecturally consumed.

Ok, sorry I didn't get it earlier... I attempted a quick fix below.