[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<LV3PR12MB92654DE00F67C170DE47B575945B2@LV3PR12MB9265.namprd12.prod.outlook.com>
Date: Thu, 14 Nov 2024 14:59:34 +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>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v2 03/35] x86/bugs: Add AUTO mitigations for
mds/taa/mmio/rfds
[AMD Official Use Only - AMD Internal Distribution Only]
> -----Original Message-----
> From: Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>
> Sent: Wednesday, November 13, 2024 8:27 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>; linux-kernel@...r.kernel.org
> Subject: Re: [PATCH v2 03/35] x86/bugs: Add AUTO mitigations for
> mds/taa/mmio/rfds
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> On Tue, Nov 05, 2024 at 03:54:23PM -0600, David Kaplan wrote:
> > @@ -1995,6 +2004,7 @@ void cpu_bugs_smt_update(void)
> > update_mds_branch_idle();
> > break;
> > case MDS_MITIGATION_OFF:
> > + case MDS_MITIGATION_AUTO:
>
> This implies AUTO and OFF are similar, which is counter intuitive.
> While mitigation selection code ...
>
> > + if (mds_mitigation == MDS_MITIGATION_AUTO)
> > + mds_mitigation = MDS_MITIGATION_FULL;
> > +
>
> ... indicates that AUTO is equivalent to FULL. So, I think AUTO should be handled
> the same way as FULL in cpu_bugs_smt_update() as well.
>
> Same for TAA and MMIO below.
>
The mitigation is never actually AUTO by the time we call cpu_bugs_smt_update(), since this happens after cpu_select_mitigations(). I had to add the case statement here so the switch statement was complete, but this case will never be hit.
Should I put a comment here about that? Or is a default case the better way to handle this?
--David Kaplan
Powered by blists - more mailing lists