mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Borislav Petkov <bp@alien8.de>
Cc: X86 ML <x86@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
	Andrew Cooper <Andrew.Cooper3@citrix.com>
Subject: Re: [PATCH] x86/CPU/AMD: Rename the spectral chicken
Date: Tue, 25 Apr 2023 22:59:44 +0200	[thread overview]
Message-ID: <20230425205944.GB1350354@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20230425195024.17808-1-bp@alien8.de>

On Tue, Apr 25, 2023 at 09:50:24PM +0200, Borislav Petkov wrote:
> From: "Borislav Petkov (AMD)" <bp@alien8.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@alien8.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.

  reply	other threads:[~2023-04-25 21:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-25 19:50 Borislav Petkov
2023-04-25 20:59 ` Peter Zijlstra [this message]
2023-04-25 21:15   ` Borislav Petkov
2023-04-26  9:14     ` Thomas Gleixner
2023-04-26  9:21       ` Borislav Petkov
2023-04-26 14:54         ` Andrew Cooper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230425205944.GB1350354@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®