[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <445daef5-8417-ddbb-abbf-3c5ab38e1c9c@intel.com>
Date: Mon, 27 Feb 2023 07:25:00 -0800
From: Dave Hansen <dave.hansen@...el.com>
To: Borislav Petkov <bp@...en8.de>,
Josh Poimboeuf <jpoimboe@...nel.org>
Cc: Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>,
Kim Phillips <kim.phillips@....com>, x86@...nel.org,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
Joao Martins <joao.m.martins@...cle.com>,
Jonathan Corbet <corbet@....net>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Sean Christopherson <seanjc@...gle.com>,
Thomas Gleixner <tglx@...utronix.de>,
David Woodhouse <dwmw@...zon.co.uk>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Juergen Gross <jgross@...e.com>,
Peter Zijlstra <peterz@...radead.org>,
Tony Luck <tony.luck@...el.com>,
Tom Lendacky <thomas.lendacky@....com>,
Alexey Kardashevskiy <aik@....com>, kvm@...r.kernel.org,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86/CPU/AMD: Make sure EFER[AIBRSE] is set
On 2/25/23 04:21, Borislav Petkov wrote:
> + /*
> + * Make sure EFER[AIBRSE - Automatic IBRS Enable] is set. The APs are brought up
> + * using the trampoline code and as part of it, EFER gets prepared there in order
> + * to be replicated onto them. Regardless, set it here again, if not set, to protect
> + * against any future refactoring/code reorganization which might miss setting
> + * this important bit.
> + */
> + if (spectre_v2_in_ibrs_mode(spectre_v2_enabled) &&
> + cpu_has(c, X86_FEATURE_AUTOIBRS))
> + msr_set_bit(MSR_EFER, _EFER_AUTOIBRS);
> }
I guess the belt and suspenders could be justified here by how important
the bit is.
But, if EFER[AIBRSE] gets clear somehow shouldn't we also dump a warning
out here so the fool who botched it can fix it? Even if AIBRSE is fixed
up, some less important bit could still be botched.
It will freak some users out, but it does seem like the kind of thing we
_want_ a bug report for.
Powered by blists - more mailing lists