[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250317214609.GJZ9iYId2LhWBgqQ10@fat_crate.local>
Date: Mon, 17 Mar 2025 22:46:09 +0100
From: Borislav Petkov <bp@...en8.de>
To: Ingo Molnar <mingo@...nel.org>
Cc: "Ahmed S. Darwish" <darwi@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>,
Andrew Cooper <andrew.cooper3@...rix.com>,
"H. Peter Anvin" <hpa@...or.com>,
John Ogness <john.ogness@...utronix.de>, x86@...nel.org,
x86-cpuid@...ts.linux.dev, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 01/29] x86: treewide: Introduce
x86_vendor_amd_or_hygon()
On Mon, Mar 17, 2025 at 10:42:09PM +0100, Ingo Molnar wrote:
>
> * Ahmed S. Darwish <darwi@...utronix.de> wrote:
>
> > - if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD &&
> > - boot_cpu_data.x86_vendor != X86_VENDOR_HYGON)
> > + if (!x86_vendor_amd_or_hygon(boot_cpu_data.x86_vendor))
> > return -ENODEV;
>
> Could we just not do this?
>
> The above vendor check may or may not be equivalent X86_FEATURE_ZEN1,
> which we could first assert via a single boot-time check:
>
> WARN_ON_ONCE(boot_cpu_has(X86_FEATURE_ZEN1) !=
> ((boot_cpu_data.x86_vendor != X86_VENDOR_AMD &&
> boot_cpu_data.x86_vendor != X86_VENDOR_HYGON)));
No, it's not.
Hygon is family 0x18 AFAIK and ZEN1 is not.
Just drop this patch.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists