File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ static const struct cpuid_dep cpuid_deps[] = {
72
72
{ X86_FEATURE_AVX512_FP16 , X86_FEATURE_AVX512BW },
73
73
{ X86_FEATURE_ENQCMD , X86_FEATURE_XSAVES },
74
74
{ X86_FEATURE_PER_THREAD_MBA , X86_FEATURE_MBA },
75
+ { X86_FEATURE_SGX_LC , X86_FEATURE_SGX },
75
76
{}
76
77
};
77
78
Original file line number Diff line number Diff line change @@ -93,15 +93,9 @@ static void init_vmx_capabilities(struct cpuinfo_x86 *c)
93
93
}
94
94
#endif /* CONFIG_X86_VMX_FEATURE_NAMES */
95
95
96
- static void clear_sgx_caps (void )
97
- {
98
- setup_clear_cpu_cap (X86_FEATURE_SGX );
99
- setup_clear_cpu_cap (X86_FEATURE_SGX_LC );
100
- }
101
-
102
96
static int __init nosgx (char * str )
103
97
{
104
- clear_sgx_caps ( );
98
+ setup_clear_cpu_cap ( X86_FEATURE_SGX );
105
99
106
100
return 0 ;
107
101
}
@@ -116,7 +110,7 @@ void init_ia32_feat_ctl(struct cpuinfo_x86 *c)
116
110
117
111
if (rdmsrl_safe (MSR_IA32_FEAT_CTL , & msr )) {
118
112
clear_cpu_cap (c , X86_FEATURE_VMX );
119
- clear_sgx_caps ( );
113
+ clear_cpu_cap ( c , X86_FEATURE_SGX );
120
114
return ;
121
115
}
122
116
@@ -177,6 +171,6 @@ void init_ia32_feat_ctl(struct cpuinfo_x86 *c)
177
171
!(msr & FEAT_CTL_SGX_LC_ENABLED ) || !enable_sgx ) {
178
172
if (enable_sgx )
179
173
pr_err_once ("SGX disabled by BIOS\n" );
180
- clear_sgx_caps ( );
174
+ clear_cpu_cap ( c , X86_FEATURE_SGX );
181
175
}
182
176
}
You can’t perform that action at this time.
0 commit comments