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

From: Mark Rutland
Date: Tue Mar 31 2020 - 05:45:27 EST


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.

> * Walks never being initiated for `inactive` contexts within the current
> translation regime. e.g. while ASID x is installed, never starting a
> walk for ASID y. I can imagine that the architecture may permit a form
> of this starting with intermediate walk entries in the TLBs.

I'm still chasing this point.

Thanks,
Mark.