[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aAKDyGpzNOCdGmN2@duo.ucw.cz>
Date: Fri, 18 Apr 2025 18:54:32 +0200
From: Pavel Machek <pavel@...x.de>
To: Sasha Levin <sashal@...nel.org>
Cc: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
Max Grobecker <max@...becker.info>, Ingo Molnar <mingo@...nel.org>,
Borislav Petkov <bp@...en8.de>, tglx@...utronix.de,
mingo@...hat.com, dave.hansen@...ux.intel.com, x86@...nel.org,
thomas.lendacky@....com, perry.yuan@....com,
mario.limonciello@....com, riel@...riel.com, mjguzik@...il.com,
seanjc@...gle.com, darwi@...utronix.de
Subject: Re: [PATCH AUTOSEL 5.10 2/6] x86/cpu: Don't clear
X86_FEATURE_LAHF_LM flag in init_amd_k8() on AMD when running in a virtual
machine
Hi!
> From: Max Grobecker <max@...becker.info>
>
> [ Upstream commit a4248ee16f411ac1ea7dfab228a6659b111e3d65 ]
> This can prevent some docker containers from starting or build scripts to create
> unoptimized binaries.
>
> Admittably, this is more a small inconvenience than a severe bug in the kernel
> and the shoddy scripts that rely on parsing /proc/cpuinfo
> should be fixed instead.
I'd say this is not good stable candidate.
Best regards,
Pavel
> +++ b/arch/x86/kernel/cpu/amd.c
> @@ -839,7 +839,7 @@ static void init_amd_k8(struct cpuinfo_x86 *c)
> * (model = 0x14) and later actually support it.
> * (AMD Erratum #110, docId: 25759).
> */
> - if (c->x86_model < 0x14 && cpu_has(c, X86_FEATURE_LAHF_LM)) {
> + if (c->x86_model < 0x14 && cpu_has(c, X86_FEATURE_LAHF_LM) && !cpu_has(c, X86_FEATURE_HYPERVISOR)) {
> clear_cpu_cap(c, X86_FEATURE_LAHF_LM);
> if (!rdmsrl_amd_safe(0xc001100d, &value)) {
> value &= ~BIT_64(32);
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)
Powered by blists - more mailing lists