diff options
author | Jarkko Sakkinen <jarkko@kernel.org> | 2020-11-13 00:01:19 +0200 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2020-11-17 14:36:13 +0100 |
commit | 38853a303982e3be3eccb1a1132399a5c5e2d806 (patch) | |
tree | 38358967c11faca7c78dae57cf6f6080f111e7a5 /arch/x86/kernel/cpu/feat_ctl.c | |
parent | 224ab3527f89f69ae57dc53555826667ac46a3cc (diff) | |
download | linux-38853a303982e3be3eccb1a1132399a5c5e2d806.tar.bz2 |
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@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>
Acked-by: Jethro Beekman <jethro@fortanix.com>
Tested-by: Sean Christopherson <sean.j.christopherson@intel.com>
Link: https://lkml.kernel.org/r/20201112220135.165028-9-jarkko@kernel.org
Diffstat (limited to 'arch/x86/kernel/cpu/feat_ctl.c')
-rw-r--r-- | arch/x86/kernel/cpu/feat_ctl.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/feat_ctl.c b/arch/x86/kernel/cpu/feat_ctl.c index d38e97325018..3b1b01f2b248 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(); |