mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Mikhail Paulyshka" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Mikhail Paulyshka <me@mixaill.net>,
	"Borislav Petkov (AMD)" <bp@alien8.de>, <stable@kernel.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/urgent] x86/CPU/AMD: Disable INVLPGB on Zen2
Date: Tue, 08 Jul 2025 19:50:23 -0000	[thread overview]
Message-ID: <175200422348.406.18432028043091419363.tip-bot2@tip-bot2> (raw)
In-Reply-To: <1ebe845b-322b-4929-9093-b41074e9e939@mixaill.net>

The following commit has been merged into the x86/urgent branch of tip:

Commit-ID:     a74bb5f202dabddfea96abc1328fcedae8aa140a
Gitweb:        https://git.kernel.org/tip/a74bb5f202dabddfea96abc1328fcedae8aa140a
Author:        Mikhail Paulyshka <me@mixaill.net>
AuthorDate:    Tue, 08 Jul 2025 16:39:10 +02:00
Committer:     Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Tue, 08 Jul 2025 21:34:01 +02:00

x86/CPU/AMD: Disable INVLPGB on Zen2

AMD Cyan Skillfish (Family 17h, Model 47h, Stepping 0h) has an issue
that causes system oopses and panics when performing TLB flush using
INVLPGB.

However, the problem is that that machine has misconfigured CPUID and
should not report the INVLPGB bit in the first place. So zap the
kernel's representation of the flag so that nothing gets confused.

  [ bp: Massage. ]

Fixes: 767ae437a32d ("x86/mm: Add INVLPGB feature and Kconfig entry")
Signed-off-by: Mikhail Paulyshka <me@mixaill.net>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Cc: <stable@kernel.org>
Link: https://lore.kernel.org/r/1ebe845b-322b-4929-9093-b41074e9e939@mixaill.net
---
 arch/x86/kernel/cpu/amd.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index e1c4661..1b1ff60 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -937,6 +937,9 @@ static void init_amd_zen2(struct cpuinfo_x86 *c)
 		msr_clear_bit(MSR_AMD64_CPUID_FN_7, 18);
 		pr_emerg("RDSEED is not reliable on this platform; disabling.\n");
 	}
+
+	/* Correct misconfigured CPUID on some clients. */
+	clear_cpu_cap(c, X86_FEATURE_INVLPGB);
 }
 
 static void init_amd_zen3(struct cpuinfo_x86 *c)

  parent reply	other threads:[~2025-07-08 19:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-24 14:53 [PATCH v2 1/1] x86/rdrand: disable RDSEED on AMD Cyan Skillfish Mikhail Paulyshka
2025-05-24 16:11 ` Borislav Petkov
2025-06-17 20:05 ` Borislav Petkov
2025-06-17 20:21   ` Dave Hansen
2025-07-07 10:17     ` Mikhail Paulyshka
2025-07-07 15:25       ` Borislav Petkov
2025-07-07 15:34       ` Dave Hansen
2025-07-06 16:42   ` Mikhail Paulyshka
2025-07-06 17:07     ` Borislav Petkov
2025-07-06 20:31       ` Mikhail Paulyshka
2025-07-08 14:50     ` [tip: x86/urgent] x86/CPU/AMD: Disable INVLPGB on Zen2 tip-bot2 for Mikhail Paulyshka
2025-07-08 19:50     ` tip-bot2 for Mikhail Paulyshka [this message]
2025-07-08 14:50 ` [tip: x86/urgent] x86/rdrand: Disable RDSEED on AMD Cyan Skillfish tip-bot2 for Mikhail Paulyshka
2025-07-08 19:50 ` tip-bot2 for Mikhail Paulyshka

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=175200422348.406.18432028043091419363.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=me@mixaill.net \
    --cc=stable@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®