On Tue, May 22, 2018 at 12:38:05PM +0200, Geert Uytterhoeven wrote: > 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. It was alert, but I've lowered it because I don't think it warrants alert status. Maybe critical would be better? Shrug, this stuff is rather subjective. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up According to speedtest.net: 8.21Mbps down 510kbps up _______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/mailman/listinfo/kvmarm