[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230425205944.GB1350354@hirez.programming.kicks-ass.net>
Date: Tue, 25 Apr 2023 22:59:44 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Borislav Petkov <bp@...en8.de>
Cc: X86 ML <x86@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
Andrew Cooper <Andrew.Cooper3@...rix.com>
Subject: Re: [PATCH] x86/CPU/AMD: Rename the spectral chicken
On Tue, Apr 25, 2023 at 09:50:24PM +0200, Borislav Petkov wrote:
> From: "Borislav Petkov (AMD)" <bp@...en8.de>
>
> We've had enough fun with the spectral chicken bit - name it what it
> really does: it suppresses non-branch predictions.
>
> Rename defines to make it clear that it is Zen2 only.
>
> No functional changes.
>
> Signed-off-by: Borislav Petkov (AMD) <bp@...en8.de>
> ---
> arch/x86/include/asm/msr-index.h | 6 ++++--
> arch/x86/kernel/cpu/amd.c | 22 +++++++++++-----------
> 2 files changed, 15 insertions(+), 13 deletions(-)
>
> diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h
> index ad35355ee43e..0094e6a1b553 100644
> --- a/arch/x86/include/asm/msr-index.h
> +++ b/arch/x86/include/asm/msr-index.h
> @@ -625,8 +625,10 @@
> /* Fam 17h MSRs */
> #define MSR_F17H_IRPERF 0xc00000e9
>
> -#define MSR_ZEN2_SPECTRAL_CHICKEN 0xc00110e3
> -#define MSR_ZEN2_SPECTRAL_CHICKEN_BIT BIT_ULL(1)
> +/* Fam 17h, Zen2 MSRs */
> +#define MSR_ZEN2_DE_CFG2 0xc00110e3
> +#define MSR_ZEN2_DE_CFG2_SUPPRESS_NOBR_PRED_BIT 1
> +#define MSR_ZEN2_DE_CFG2_SUPPRESS_NOBR_PRED BIT(MSR_ZEN2_DE_CFG2_SUPPRESS_NOBR_PRED_BIT)
NAK, I had to write all this without *any* official communication from
AMD, mostly on hear-say.
This gets to be the spectral chicken forever more as punishment. Next
time AMD can try again, and if they manage to get their act together and
publish something before I get to write the code and invent a name for a
magical bit, they get to name it how they like.
Powered by blists - more mailing lists