From: "tip-bot2 for Rik van Riel" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Borislav Petkov <bp@alien8.de>, Rik van Riel <riel@surriel.com>,
<stable@kernel.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/urgent] x86/CPU: Add a tlbi= cmdline switch
Date: Mon, 10 Aug 2026 16:47:26 -0000 [thread overview]
Message-ID: <178638044659.442315.738092015186287682.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20260729204341.3eb0b5ea@fangorn>
The following commit has been merged into the x86/urgent branch of tip:
Commit-ID: abe7c8b09bd72a9c726016257c6281f129b4c02d
Gitweb: https://git.kernel.org/tip/abe7c8b09bd72a9c726016257c6281f129b4c02d
Author: Rik van Riel <riel@surriel.com>
AuthorDate: Thu, 06 Aug 2026 08:54:57 -07:00
Committer: Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Mon, 10 Aug 2026 07:09:18 -07:00
x86/CPU: Add a tlbi= cmdline switch
With the recently found INVLPGB / TLBSYNC issue, there has been some
interest in disabling INVLPGB-based TLB flushing, in order to rule out
that CPU issue as a cause of userspace crashes.
Add a kernel command line option to control the TLB flushing behavior.
If the need arises, we will add a "tlbi=broadcast" for the case when TLB
invalidation broadcasts need to be explicitly selected, but this is not
needed now yet.
[ bp: Rewrite commit message, move to cpu/common.c, add documentation. ]
Fixes: 767ae437a32d ("x86/mm: Add INVLPGB feature and Kconfig entry")
Suggested-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Rik van Riel <riel@surriel.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Cc: <stable@kernel.org>
Link: https://patch.msgid.link/20260729204341.3eb0b5ea@fangorn
---
Documentation/admin-guide/kernel-parameters.txt | 4 ++++
arch/x86/kernel/cpu/common.c | 10 ++++++++++
2 files changed, 14 insertions(+)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 3d35270..e8ff369 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -7568,6 +7568,10 @@ Kernel parameters
See Documentation/admin-guide/mm/transhuge.rst for more
details.
+ tlbi= [X86-64]
+ Format: {ipi}
+ ipi: switch to IPI-based TLB flushing
+
topology= [S390,EARLY]
Format: {off | on}
Specify if the kernel should make use of the cpu
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index a3df21d..a3caddd 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -2664,3 +2664,13 @@ void __init arch_cpu_finalize_init(void)
*/
mem_encrypt_init();
}
+
+/* Control TLB flushing methods */
+static int __init tlbi_setup(char *str)
+{
+ if (!strcmp(str, "ipi"))
+ setup_clear_cpu_cap(X86_FEATURE_INVLPGB);
+
+ return 1;
+}
+__setup("tlbi=", tlbi_setup);
prev parent reply other threads:[~2026-08-10 16:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-30 0:43 [PATCH] add tlbi=off to disable INVLPGB Rik van Riel
2026-07-30 1:44 ` Borislav Petkov
2026-07-30 10:32 ` Peter Zijlstra
2026-07-30 16:23 ` Borislav Petkov
2026-07-30 17:31 ` Peter Zijlstra
2026-07-30 18:24 ` Borislav Petkov
2026-07-31 8:46 ` Peter Zijlstra
2026-07-31 9:14 ` David Laight
2026-07-31 11:47 ` Rik van Riel
2026-07-31 18:32 ` Borislav Petkov
2026-08-06 15:54 ` [PATCH] x86/CPU: Add a tlbi= cmdline switch Borislav Petkov
2026-08-10 16:47 ` tip-bot2 for Rik van Riel [this message]
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=178638044659.442315.738092015186287682.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=riel@surriel.com \
--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®