[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<LV3PR12MB92659AA05023FB02696B7F0894F1A@LV3PR12MB9265.namprd12.prod.outlook.com>
Date: Fri, 24 Oct 2025 14:43:54 +0000
From: "Kaplan, David" <David.Kaplan@....com>
To: Pawan Gupta <pawan.kumar.gupta@...ux.intel.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" <x86@...nel.org>, "H . Peter Anvin" <hpa@...or.com>,
Alexander Graf <graf@...zon.com>, Boris Ostrovsky
<boris.ostrovsky@...cle.com>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: RE: [RFC PATCH 14/56] x86/bugs: Reset GDS mitigations
[AMD Official Use Only - AMD Internal Distribution Only]
> -----Original Message-----
> From: Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>
> Sent: Thursday, October 23, 2025 9:41 PM
> To: Kaplan, David <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>; Alexander Graf
> <graf@...zon.com>; Boris Ostrovsky <boris.ostrovsky@...cle.com>; linux-
> kernel@...r.kernel.org
> Subject: Re: [RFC PATCH 14/56] x86/bugs: Reset GDS mitigations
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> On Mon, Oct 13, 2025 at 09:34:02AM -0500, David Kaplan wrote:
> > Add function to reset GDS mitigations back to their boot-time defaults.
> >
> > Signed-off-by: David Kaplan <david.kaplan@....com>
> > ---
> > arch/x86/kernel/cpu/bugs.c | 13 +++++++++++++
> > 1 file changed, 13 insertions(+)
> >
> > diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
> > index 112553058ccc..e765ac0b9240 100644
> > --- a/arch/x86/kernel/cpu/bugs.c
> > +++ b/arch/x86/kernel/cpu/bugs.c
> > @@ -1182,6 +1182,18 @@ static void __init gds_apply_mitigation(void)
> > pr_info("%s\n", gds_strings[gds_mitigation]);
> > }
> >
> > +#ifdef CONFIG_DYNAMIC_MITIGATIONS
> > +static void gds_reset_mitigation(void)
> > +{
> > + /* To cause the MSR bit to be cleared. */
> > + gds_mitigation = GDS_MITIGATION_OFF;
> > + if (x86_arch_cap_msr & ARCH_CAP_GDS_CTRL)
> > + update_gds_msr();
>
> This also needs to check for GDS_MITIGATION_FULL_LOCKED, otherwise in the
> locked case it would trigger this warning in update_gds_msr():
>
> WARN_ON_ONCE(mcu_ctrl != mcu_ctrl_after);
Ah, thanks. I will qualify the call to update_gds_msr() with this.
--David Kaplan
Powered by blists - more mailing lists