[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241114064001.v6ogsiaptrh6oixc@desk>
Date: Wed, 13 Nov 2024 22:57:19 -0800
From: Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>
To: David Kaplan <david.kaplan@....com>
Cc: Thomas Gleixner <tglx@...utronix.de>, Borislav Petkov <bp@...en8.de>,
Peter Zijlstra <peterz@...radead.org>,
Josh Poimboeuf <jpoimboe@...nel.org>,
Ingo Molnar <mingo@...hat.com>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H . Peter Anvin" <hpa@...or.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 11/35] x86/bugs: Restructure spectre_v1 mitigation
On Tue, Nov 05, 2024 at 03:54:31PM -0600, David Kaplan wrote:
> static void __init spectre_v1_select_mitigation(void)
> {
> - if (!boot_cpu_has_bug(X86_BUG_SPECTRE_V1) || cpu_mitigations_off()) {
> + if (!boot_cpu_has_bug(X86_BUG_SPECTRE_V1) || cpu_mitigations_off())
> spectre_v1_mitigation = SPECTRE_V1_MITIGATION_NONE;
> +}
> +
> +static void __init spectre_v1_apply_mitigation(void)
> +{
> + if (!boot_cpu_has_bug(X86_BUG_SPECTRE_V1) || cpu_mitigations_off())
We probably don't need to repeat this check, is this okay:
if (spectre_v1_mitigation == SPECTRE_V1_MITIGATION_NONE)
> return;
> - }
>
> if (spectre_v1_mitigation == SPECTRE_V1_MITIGATION_AUTO) {
Powered by blists - more mailing lists