Hi Russell, On Wed, May 16, 2018 at 1:01 PM, Russell King <rmk+kernel@xxxxxxxxxxxxxxx> wrote: > When the branch predictor hardening is enabled, firmware must have set > the IBE bit in the auxiliary control register. If this bit has not > been set, the Spectre workarounds will not be functional. > > Add validation that this bit is set, and print a warning at alert level > if this is not the case. > > Signed-off-by: Russell King <rmk+kernel@xxxxxxxxxxxxxxx> Thanks for your patch! > --- /dev/null > +++ b/arch/arm/mm/proc-v7-bugs.c > @@ -0,0 +1,29 @@ > +// SPDX-License-Identifier: GPL-2.0 > +#include <linux/kernel.h> > +#include <linux/smp.h> > + > +static __maybe_unused void cpu_v7_check_auxcr_set(u32 mask, const char *msg) > +{ > + u32 aux_cr; > + > + asm("mrc p15, 0, %0, c1, c0, 1" : "=r" (aux_cr)); > + > + if ((aux_cr & mask) != mask) > + pr_err("CPU%u: %s", smp_processor_id(), msg); pr_alert(), to match the patch description. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds _______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/mailman/listinfo/kvmarm