[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <160571990588.11244.9096170663826227133.tip-bot2@tip-bot2>
Date: Wed, 18 Nov 2020 17:18:25 -0000
From: "tip-bot2 for Jarkko Sakkinen" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Jarkko Sakkinen <jarkko@...nel.org>, Borislav Petkov <bp@...e.de>,
Sean Christopherson <sean.j.christopherson@...el.com>,
Jethro Beekman <jethro@...tanix.com>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: x86/sgx] x86/cpu/intel: Add a nosgx kernel parameter
The following commit has been merged into the x86/sgx branch of tip:
Commit-ID: 38853a303982e3be3eccb1a1132399a5c5e2d806
Gitweb: https://git.kernel.org/tip/38853a303982e3be3eccb1a1132399a5c5e2d806
Author: Jarkko Sakkinen <jarkko@...nel.org>
AuthorDate: Fri, 13 Nov 2020 00:01:19 +02:00
Committer: Borislav Petkov <bp@...e.de>
CommitterDate: Tue, 17 Nov 2020 14:36:13 +01:00
x86/cpu/intel: Add a nosgx kernel parameter
Add a kernel parameter to disable SGX kernel support and document it.
[ bp: Massage. ]
Signed-off-by: Jarkko Sakkinen <jarkko@...nel.org>
Signed-off-by: Borislav Petkov <bp@...e.de>
Reviewed-by: Sean Christopherson <sean.j.christopherson@...el.com>
Acked-by: Jethro Beekman <jethro@...tanix.com>
Tested-by: Sean Christopherson <sean.j.christopherson@...el.com>
Link: https://lkml.kernel.org/r/20201112220135.165028-9-jarkko@kernel.org
---
Documentation/admin-guide/kernel-parameters.txt | 2 ++
arch/x86/kernel/cpu/feat_ctl.c | 9 +++++++++
2 files changed, 11 insertions(+)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 526d65d..42d1528 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -3368,6 +3368,8 @@
nosep [BUGS=X86-32] Disables x86 SYSENTER/SYSEXIT support.
+ nosgx [X86-64,SGX] Disables Intel SGX kernel support.
+
nosmp [SMP] Tells an SMP kernel to act as a UP kernel,
and disable the IO APIC. legacy for "maxcpus=0".
diff --git a/arch/x86/kernel/cpu/feat_ctl.c b/arch/x86/kernel/cpu/feat_ctl.c
index d38e973..3b1b01f 100644
--- a/arch/x86/kernel/cpu/feat_ctl.c
+++ b/arch/x86/kernel/cpu/feat_ctl.c
@@ -99,6 +99,15 @@ static void clear_sgx_caps(void)
setup_clear_cpu_cap(X86_FEATURE_SGX_LC);
}
+static int __init nosgx(char *str)
+{
+ clear_sgx_caps();
+
+ return 0;
+}
+
+early_param("nosgx", nosgx);
+
void init_ia32_feat_ctl(struct cpuinfo_x86 *c)
{
bool tboot = tboot_enabled();
Powered by blists - more mailing lists