From: Rik van Riel <riel@surriel.com>
To: Thomas Gleixner <tglx@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
linux-kernel@vger.kernel.org, Nikunj A Dadhania <nikunj@amd.com>,
Babu Moger <babu.moger@amd.com>,
kernel-team@meta.com
Subject: [PATCH] x86/cpufeatures: make clearcpuid=invlpgb work
Date: Wed, 29 Jul 2026 13:06:46 -0400 [thread overview]
Message-ID: <20260729130646.304ad69d@fangorn> (raw)
With the recently found INVLPGB / TLBSYNC issue, there has
been some interest in disabling invlpgb TLB flushing, in
order to rule out that issue wihle tracking down some
userspace crash.
The top search result shows "clearcpuid=invlpgb"
However, invlpgb is not actually in x86_cap_flags, so booting
with clearcpuid=invlpgb results in the following message:
clearcpuid: unknown CPU flag: invlpgb
Adding "invlpgb" to the comment after X86_FEATURE_INVLPGB
causes mkcapflags.sh to pick up invlpgb, and add it to
x86_cap_flags.
With that change, clearcpuid=invlpgb works:
clearcpuid: force-disabling CPU feature flag: invlpgb
Signed-off-by: Rik van Riel <riel@surriel.com>
---
arch/x86/include/asm/cpufeatures.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h
index 1b4a48bff18f..62fa2b0236af 100644
--- a/arch/x86/include/asm/cpufeatures.h
+++ b/arch/x86/include/asm/cpufeatures.h
@@ -332,7 +332,7 @@
#define X86_FEATURE_CLZERO (13*32+ 0) /* "clzero" CLZERO instruction */
#define X86_FEATURE_IRPERF (13*32+ 1) /* "irperf" Instructions Retired Count */
#define X86_FEATURE_XSAVEERPTR (13*32+ 2) /* "xsaveerptr" Always save/restore FP error pointers */
-#define X86_FEATURE_INVLPGB (13*32+ 3) /* INVLPGB and TLBSYNC instructions supported */
+#define X86_FEATURE_INVLPGB (13*32+ 3) /* "invplgb" INVLPGB and TLBSYNC instructions supported */
#define X86_FEATURE_RDPRU (13*32+ 4) /* "rdpru" Read processor register at user level */
#define X86_FEATURE_WBNOINVD (13*32+ 9) /* "wbnoinvd" WBNOINVD instruction */
#define X86_FEATURE_AMD_IBPB (13*32+12) /* Indirect Branch Prediction Barrier */
--
2.54.0
next reply other threads:[~2026-07-29 17:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 17:06 Rik van Riel [this message]
2026-07-29 18:33 ` [PATCH] x86/cpufeatures: make clearcpuid=invlpgb work Borislav Petkov
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=20260729130646.304ad69d@fangorn \
--to=riel@surriel.com \
--cc=babu.moger@amd.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=nikunj@amd.com \
--cc=tglx@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