[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<LV3PR12MB92655C851F23DC73AEC50B9E94F22@LV3PR12MB9265.namprd12.prod.outlook.com>
Date: Mon, 10 Feb 2025 22:33:03 +0000
From: "Kaplan, David" <David.Kaplan@....com>
To: Josh Poimboeuf <jpoimboe@...nel.org>
CC: Thomas Gleixner <tglx@...utronix.de>, Borislav Petkov <bp@...en8.de>,
Peter Zijlstra <peterz@...radead.org>, Pawan Gupta
<pawan.kumar.gupta@...ux.intel.com>, Ingo Molnar <mingo@...hat.com>, Dave
Hansen <dave.hansen@...ux.intel.com>, "x86@...nel.org" <x86@...nel.org>, "H .
Peter Anvin" <hpa@...or.com>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v3 04/35] x86/bugs: Restructure mds mitigation
[AMD Official Use Only - AMD Internal Distribution Only]
> -----Original Message-----
> From: Josh Poimboeuf <jpoimboe@...nel.org>
> Sent: Monday, February 10, 2025 4:25 PM
> To: Kaplan, David <David.Kaplan@....com>
> Cc: Thomas Gleixner <tglx@...utronix.de>; Borislav Petkov <bp@...en8.de>; Peter
> Zijlstra <peterz@...radead.org>; Pawan Gupta
> <pawan.kumar.gupta@...ux.intel.com>; 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 v3 04/35] x86/bugs: Restructure mds mitigation
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> On Wed, Jan 08, 2025 at 02:24:44PM -0600, David Kaplan wrote:
> > @@ -229,9 +259,6 @@ static void x86_amd_ssb_disable(void)
> > wrmsrl(MSR_AMD64_LS_CFG, msrval); }
> >
> > -#undef pr_fmt
> > -#define pr_fmt(fmt) "MDS: " fmt
> > -
>
> Why? For consistency with the rest of the file it's best to leave the correct pr_fmt()
> in place for mds_*(), taa_*(), rfds_*(), etc.
I had removed it because it wasn't used, but it actually can be used for the pr_info in mds_update_mitigation so I'll put it back.
>
> > static void __init mds_select_mitigation(void) {
> > - if (!boot_cpu_has_bug(X86_BUG_MDS) || cpu_mitigations_off()) {
> > + if (!boot_cpu_has_bug(X86_BUG_MDS) || cpu_mitigations_off())
> > mds_mitigation = MDS_MITIGATION_OFF;
> > - return;
> > - }
>
> For clarity it should still return here, that makes it obvious none of the subsequent
> conditions apply.
Ok
>
> > +static void __init mds_apply_mitigation(void) {
> > + if (mds_mitigation == MDS_MITIGATION_FULL) {
> > + setup_force_cpu_cap(X86_FEATURE_CLEAR_CPU_BUF);
>
> The mitigation still needs to be attempted for the MDS_MITIGATION_VMWERV
> case.
>
Good catch, will fix.
Thanks --David Kaplan
Powered by blists - more mailing lists