From: tip-bot for Andy Lutomirski <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: dave.hansen@linux.intel.com, bp@alien8.de, luto@kernel.org,
mingo@kernel.org, hpa@zytor.com, tglx@linutronix.de,
luto@amacapital.net, aryabinin@virtuozzo.com,
dvlasenk@redhat.com, bp@suse.de, peterz@infradead.org,
torvalds@linux-foundation.org, toshi.kani@hp.com,
mcgrof@suse.com, oleg@redhat.com, brgerst@gmail.com,
akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: [tip:x86/mm] x86/mm: Add a 'noinvpcid' boot option to turn off INVPCID
Date: Tue, 9 Feb 2016 08:07:52 -0800 [thread overview]
Message-ID: <tip-d12a72b844a49d4162f24cefdab30bed3f86730e@git.kernel.org> (raw)
In-Reply-To: <f586317ed1bc2b87aee652267e515b90051af385.1454096309.git.luto@kernel.org>
Commit-ID: d12a72b844a49d4162f24cefdab30bed3f86730e
Gitweb: http://git.kernel.org/tip/d12a72b844a49d4162f24cefdab30bed3f86730e
Author: Andy Lutomirski <luto@kernel.org>
AuthorDate: Fri, 29 Jan 2016 11:42:58 -0800
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 9 Feb 2016 13:36:10 +0100
x86/mm: Add a 'noinvpcid' boot option to turn off INVPCID
This adds a chicken bit to turn off INVPCID in case something goes
wrong. It's an early_param() because we do TLB flushes before we
parse __setup() parameters.
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Reviewed-by: Borislav Petkov <bp@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Luis R. Rodriguez <mcgrof@suse.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Toshi Kani <toshi.kani@hp.com>
Cc: linux-mm@kvack.org
Link: http://lkml.kernel.org/r/f586317ed1bc2b87aee652267e515b90051af385.1454096309.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
Documentation/kernel-parameters.txt | 2 ++
arch/x86/kernel/cpu/common.c | 16 ++++++++++++++++
2 files changed, 18 insertions(+)
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 551ecf0..e4c4d2a 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -2566,6 +2566,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
nointroute [IA-64]
+ noinvpcid [X86] Disable the INVPCID cpu feature.
+
nojitter [IA-64] Disables jitter checking for ITC timers.
no-kvmclock [X86,KVM] Disable paravirtualized KVM clock driver
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 37830de..f4d0aa6 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -162,6 +162,22 @@ static int __init x86_mpx_setup(char *s)
}
__setup("nompx", x86_mpx_setup);
+static int __init x86_noinvpcid_setup(char *s)
+{
+ /* noinvpcid doesn't accept parameters */
+ if (s)
+ return -EINVAL;
+
+ /* do not emit a message if the feature is not present */
+ if (!boot_cpu_has(X86_FEATURE_INVPCID))
+ return 0;
+
+ setup_clear_cpu_cap(X86_FEATURE_INVPCID);
+ pr_info("noinvpcid: INVPCID feature disabled\n");
+ return 0;
+}
+early_param("noinvpcid", x86_noinvpcid_setup);
+
#ifdef CONFIG_X86_32
static int cachesize_override = -1;
static int disable_x86_serial_nr = 1;
next prev parent reply other threads:[~2016-02-09 16:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-29 19:42 [PATCH v3 0/3] x86/mm: INVPCID support Andy Lutomirski
2016-01-29 19:42 ` [PATCH v3 1/3] x86/mm: Add INVPCID helpers Andy Lutomirski
2016-02-09 16:07 ` [tip:x86/mm] " tip-bot for Andy Lutomirski
2016-02-10 12:08 ` Borislav Petkov
2016-02-10 13:48 ` Michael Matz
2016-02-10 14:51 ` [PATCH -v1.1] x86/mm: Fix INVPCID asm constraint Borislav Petkov
2016-02-11 2:48 ` Andy Lutomirski
2016-01-29 19:42 ` [PATCH v3 2/3] x86/mm: Add a noinvpcid option to turn off INVPCID Andy Lutomirski
2016-02-09 16:07 ` tip-bot for Andy Lutomirski [this message]
2016-01-29 19:42 ` [PATCH v3 3/3] x86/mm: If INVPCID is available, use it to flush global mappings Andy Lutomirski
2016-02-09 16:08 ` [tip:x86/mm] " tip-bot for Andy Lutomirski
2016-02-01 10:51 ` [PATCH v3 0/3] x86/mm: INVPCID support 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=tip-d12a72b844a49d4162f24cefdab30bed3f86730e@git.kernel.org \
--to=tipbot@zytor.com \
--cc=akpm@linux-foundation.org \
--cc=aryabinin@virtuozzo.com \
--cc=bp@alien8.de \
--cc=bp@suse.de \
--cc=brgerst@gmail.com \
--cc=dave.hansen@linux.intel.com \
--cc=dvlasenk@redhat.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=luto@kernel.org \
--cc=mcgrof@suse.com \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=toshi.kani@hp.com \
/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;
as well as URLs for NNTP newsgroup(s).