mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nikolay Borisov <nik.borisov@suse.com>
To: Borislav Petkov <bp@alien8.de>, X86 ML <x86@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 07/13] x86/CPU/AMD: Move Zenbleed check to the Zen2 init function
Date: Mon, 20 Nov 2023 14:53:54 +0200	[thread overview]
Message-ID: <bae4d27d-5882-468d-a5bd-80b34c10dd80@suse.com> (raw)
In-Reply-To: <20231120104152.13740-8-bp@alien8.de>



On 20.11.23 г. 12:41 ч., Borislav Petkov wrote:
> From: "Borislav Petkov (AMD)" <bp@alien8.de>
> 
> Prefix it properly so that it is clear which generation it is dealing
> with.
> 
> No functional changes.
> 
> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
> ---
>   arch/x86/kernel/cpu/amd.c | 70 +++++++++++++++++----------------------
>   1 file changed, 30 insertions(+), 40 deletions(-)
> 
> diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
> index 8d90f5f6b0d9..7cbb108afaf4 100644
> --- a/arch/x86/kernel/cpu/amd.c
> +++ b/arch/x86/kernel/cpu/amd.c
> @@ -70,12 +70,6 @@ static const int amd_erratum_383[] =
>   static const int amd_erratum_1054[] =
>   	AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x17, 0, 0, 0x2f, 0xf));
>   
> -static const int amd_zenbleed[] =
> -	AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x17, 0x30, 0x0, 0x4f, 0xf),
> -			   AMD_MODEL_RANGE(0x17, 0x60, 0x0, 0x7f, 0xf),
> -			   AMD_MODEL_RANGE(0x17, 0x90, 0x0, 0x91, 0xf),
> -			   AMD_MODEL_RANGE(0x17, 0xa0, 0x0, 0xaf, 0xf));
> -
>   static const int amd_div0[] =
>   	AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x17, 0x00, 0x0, 0x2f, 0xf),
>   			   AMD_MODEL_RANGE(0x17, 0x50, 0x0, 0x5f, 0xf));
> @@ -1039,33 +1033,6 @@ static void init_amd_zen(struct cpuinfo_x86 *c)
>   
>   }
>   
> -static void init_amd_zen2(struct cpuinfo_x86 *c)
> -{
> -	init_amd_zen_common();
> -	init_spectral_chicken(c);
> -	fix_erratum_1386(c);
> -}
> -
> -static void init_amd_zen3(struct cpuinfo_x86 *c)
> -{
> -	init_amd_zen_common();
> -
> -	if (!cpu_has(c, X86_FEATURE_HYPERVISOR)) {
> -		/*
> -		 * Zen3 (Fam19 model < 0x10) parts are not susceptible to
> -		 * Branch Type Confusion, but predate the allocation of the
> -		 * BTC_NO bit.
> -		 */
> -		if (!cpu_has(c, X86_FEATURE_BTC_NO))
> -			set_cpu_cap(c, X86_FEATURE_BTC_NO);
> -	}
> -}
> -
> -static void init_amd_zen4(struct cpuinfo_x86 *c)
> -{
> -	init_amd_zen_common();
> -}

nit:  If you initially introduced the zen-specific functions right after 
zenbleed_check you would have avoided the function move in this patch 
which would have reduced the overall diff.

<snip>

  reply	other threads:[~2023-11-20 12:54 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-20 10:41 [PATCH 00/13] x86/CPU/AMD: Rework Zen family detection and other fun Borislav Petkov
2023-11-20 10:41 ` [PATCH 01/13] x86/CPU/AMD: Add ZenX generations flags Borislav Petkov
2023-11-29 11:22   ` [tip: x86/cpu] " tip-bot2 for Borislav Petkov (AMD)
2023-11-30 17:05   ` [PATCH 01/13] " Tom Lendacky
2023-11-30 17:13     ` Borislav Petkov
2023-11-30 17:30       ` Brian Gerst
2023-11-30 18:17       ` Tom Lendacky
2023-11-30 18:50         ` Borislav Petkov
2023-12-02 12:49           ` [PATCH] x86/CPU/AMD: Add X86_FEATURE_ZEN1 Borislav Petkov
2023-12-04 14:36             ` Tom Lendacky
2023-12-04 15:32               ` Borislav Petkov
2023-12-12 10:33     ` [tip: x86/cpu] " tip-bot2 for Borislav Petkov (AMD)
2023-11-20 10:41 ` [PATCH 02/13] x86/CPU/AMD: Carve out the erratum 1386 fix Borislav Petkov
2023-11-29 11:22   ` [tip: x86/cpu] " tip-bot2 for Borislav Petkov (AMD)
2023-11-20 10:41 ` [PATCH 03/13] x86/CPU/AMD: Move the Zen3 BTC_NO detection to the Zen3 init function Borislav Petkov
2023-11-29 11:22   ` [tip: x86/cpu] " tip-bot2 for Borislav Petkov (AMD)
2023-11-20 10:41 ` [PATCH 04/13] x86/CPU/AMD: Move erratum 1076 fix into the Zen1 " Borislav Petkov
2023-11-29 11:22   ` [tip: x86/cpu] " tip-bot2 for Borislav Petkov (AMD)
2023-11-20 10:41 ` [PATCH 05/13] x86/CPU/AMD: Call the spectral chicken in the Zen2 " Borislav Petkov
2023-11-29 11:22   ` [tip: x86/cpu] " tip-bot2 for Borislav Petkov (AMD)
2023-11-20 10:41 ` [PATCH 06/13] x86/CPU/AMD: Rename init_amd_zn() to init_amd_zen_common() Borislav Petkov
2023-11-29 11:22   ` [tip: x86/cpu] " tip-bot2 for Borislav Petkov (AMD)
2023-11-20 10:41 ` [PATCH 07/13] x86/CPU/AMD: Move Zenbleed check to the Zen2 init function Borislav Petkov
2023-11-20 12:53   ` Nikolay Borisov [this message]
2023-11-21 10:41     ` Borislav Petkov
2023-11-29 11:22   ` [tip: x86/cpu] " tip-bot2 for Borislav Petkov (AMD)
2023-11-20 10:41 ` [PATCH 08/13] x86/CPU/AMD: Move the DIV0 bug detection to the Zen1 " Borislav Petkov
2023-11-29 11:22   ` [tip: x86/cpu] " tip-bot2 for Borislav Petkov (AMD)
2023-11-20 10:41 ` [PATCH 09/13] x86/CPU/AMD: Get rid of amd_erratum_1054[] Borislav Petkov
2023-11-29 11:22   ` [tip: x86/cpu] " tip-bot2 for Borislav Petkov (AMD)
2023-11-20 10:41 ` [PATCH 10/13] x86/CPU/AMD: Get rid of amd_erratum_383[] Borislav Petkov
2023-11-29 11:22   ` [tip: x86/cpu] " tip-bot2 for Borislav Petkov (AMD)
2023-11-20 10:41 ` [PATCH 11/13] x86/CPU/AMD: Get rid of amd_erratum_400[] Borislav Petkov
2023-11-29 11:22   ` [tip: x86/cpu] " tip-bot2 for Borislav Petkov (AMD)
2023-11-20 10:41 ` [PATCH 12/13] x86/CPU/AMD: Get rid of amd_erratum_1485[] Borislav Petkov
2023-11-29 11:22   ` [tip: x86/cpu] " tip-bot2 for Borislav Petkov (AMD)
2023-11-20 10:41 ` [PATCH 13/13] x86/CPU/AMD: Drop now unused CPU erratum checking function Borislav Petkov
2023-11-29 11:22   ` [tip: x86/cpu] " tip-bot2 for Borislav Petkov (AMD)
2023-11-20 15:08 ` [PATCH 00/13] x86/CPU/AMD: Rework Zen family detection and other fun Nikolay Borisov

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=bae4d27d-5882-468d-a5bd-80b34c10dd80@suse.com \
    --to=nik.borisov@suse.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®