xref: /linux/arch/x86/Kconfig.cpufeatures (revision 6f7e6393d1ce636bb7ec77a7fe7b77458fddf701)
1# SPDX-License-Identifier: GPL-2.0
2#
3# x86 feature bits (see arch/x86/include/asm/cpufeatures.h) that are
4# either REQUIRED to be enabled, or DISABLED (always ignored) for this
5# particular compile-time configuration.  The tests for these features
6# are turned into compile-time constants via the generated
7# <asm/cpufeaturemasks.h>.
8#
9# The naming of these variables *must* match asm/cpufeatures.h, e.g.,
10#     X86_FEATURE_ALWAYS <==> X86_REQUIRED_FEATURE_ALWAYS
11#     X86_FEATURE_FRED   <==> X86_DISABLED_FEATURE_FRED
12#
13# And these REQUIRED and DISABLED config options are manipulated in an
14# AWK script as the following example:
15#
16#                          +----------------------+
17#                          |    X86_FRED = y ?    |
18#                          +----------------------+
19#                              /             \
20#                           Y /               \ N
21#  +-------------------------------------+   +-------------------------------+
22#  | X86_DISABLED_FEATURE_FRED undefined |   | X86_DISABLED_FEATURE_FRED = y |
23#  +-------------------------------------+   +-------------------------------+
24#                                                        |
25#                                                        |
26#     +-------------------------------------------+      |
27#     | X86_FEATURE_FRED: feature word 12, bit 17 | ---->|
28#     +-------------------------------------------+      |
29#                                                        |
30#                                                        |
31#                                     +-------------------------------+
32#                                     | set bit 17 of DISABLED_MASK12 |
33#                                     +-------------------------------+
34#
35
36config X86_REQUIRED_FEATURE_ALWAYS
37	def_bool y
38
39config X86_REQUIRED_FEATURE_NOPL
40	def_bool y
41	depends on X86_64
42
43config X86_REQUIRED_FEATURE_CX8
44	def_bool y
45	depends on X86_CX8
46
47# this should be set for all -march=.. options where the compiler
48# generates cmov.
49config X86_REQUIRED_FEATURE_CMOV
50	def_bool y
51	depends on X86_CMOV
52
53# this should be set for all -march= options where the compiler
54# generates movbe.
55config X86_REQUIRED_FEATURE_MOVBE
56	def_bool y
57	depends on MATOM
58
59config X86_REQUIRED_FEATURE_SYSFAST32
60	def_bool y
61	depends on X86_64 && !X86_FRED
62
63config X86_REQUIRED_FEATURE_CPUID
64	def_bool y
65	depends on X86_64
66
67config X86_REQUIRED_FEATURE_UP
68	def_bool y
69	depends on !SMP
70
71config X86_REQUIRED_FEATURE_FPU
72	def_bool y
73	depends on !MATH_EMULATION
74
75config X86_REQUIRED_FEATURE_PAE
76	def_bool y
77	depends on X86_64 || X86_PAE
78
79config X86_REQUIRED_FEATURE_PSE
80	def_bool y
81	depends on X86_64 && !PARAVIRT_XXL
82
83config X86_REQUIRED_FEATURE_PGE
84	def_bool y
85	depends on X86_64 && !PARAVIRT_XXL
86
87config X86_REQUIRED_FEATURE_MSR
88	def_bool y
89	depends on X86_64
90
91config X86_REQUIRED_FEATURE_FXSR
92	def_bool y
93	depends on X86_64
94
95config X86_REQUIRED_FEATURE_XMM
96	def_bool y
97	depends on X86_64
98
99config X86_REQUIRED_FEATURE_XMM2
100	def_bool y
101	depends on X86_64
102
103config X86_REQUIRED_FEATURE_LM
104	def_bool y
105	depends on X86_64
106
107config X86_DISABLED_FEATURE_UMIP
108	def_bool y
109	depends on !X86_UMIP
110
111config X86_DISABLED_FEATURE_VME
112	def_bool y
113	depends on X86_64
114
115config X86_DISABLED_FEATURE_K6_MTRR
116	def_bool y
117	depends on X86_64
118
119config X86_DISABLED_FEATURE_CYRIX_ARR
120	def_bool y
121	depends on X86_64
122
123config X86_DISABLED_FEATURE_CENTAUR_MCR
124	def_bool y
125	depends on X86_64
126
127config X86_DISABLED_FEATURE_SYSCALL32
128	def_bool y
129	depends on !X86_64
130
131config X86_DISABLED_FEATURE_PCID
132	def_bool y
133	depends on !X86_64
134
135config X86_DISABLED_FEATURE_LASS
136	def_bool y
137	depends on X86_32
138
139config X86_DISABLED_FEATURE_PKU
140	def_bool y
141	depends on !X86_INTEL_MEMORY_PROTECTION_KEYS
142
143config X86_DISABLED_FEATURE_OSPKE
144	def_bool y
145	depends on !X86_INTEL_MEMORY_PROTECTION_KEYS
146
147config X86_DISABLED_FEATURE_PTI
148	def_bool y
149	depends on !MITIGATION_PAGE_TABLE_ISOLATION
150
151config X86_DISABLED_FEATURE_RETPOLINE
152	def_bool y
153	depends on !MITIGATION_RETPOLINE
154
155config X86_DISABLED_FEATURE_RETPOLINE_LFENCE
156	def_bool y
157	depends on !MITIGATION_RETPOLINE
158
159config X86_DISABLED_FEATURE_RETHUNK
160	def_bool y
161	depends on !MITIGATION_RETHUNK
162
163config X86_DISABLED_FEATURE_UNRET
164	def_bool y
165	depends on !MITIGATION_UNRET_ENTRY
166
167config X86_DISABLED_FEATURE_CALL_DEPTH
168	def_bool y
169	depends on !MITIGATION_CALL_DEPTH_TRACKING
170
171config X86_DISABLED_FEATURE_LAM
172	def_bool y
173	depends on !ADDRESS_MASKING
174
175config X86_DISABLED_FEATURE_ENQCMD
176	def_bool y
177	depends on !INTEL_IOMMU_SVM
178
179config X86_DISABLED_FEATURE_SGX
180	def_bool y
181	depends on !X86_SGX
182
183config X86_DISABLED_FEATURE_XENPV
184	def_bool y
185	depends on !XEN_PV
186
187config X86_DISABLED_FEATURE_TDX_GUEST
188	def_bool y
189	depends on !INTEL_TDX_GUEST
190
191config X86_DISABLED_FEATURE_USER_SHSTK
192	def_bool y
193	depends on !X86_USER_SHADOW_STACK
194
195config X86_DISABLED_FEATURE_IBT
196	def_bool y
197	depends on !X86_KERNEL_IBT
198
199config X86_DISABLED_FEATURE_FRED
200	def_bool y
201	depends on !X86_FRED
202
203config X86_DISABLED_FEATURE_SEV_SNP
204	def_bool y
205	depends on !KVM_AMD_SEV
206
207config X86_DISABLED_FEATURE_INVLPGB
208	def_bool y
209	depends on !BROADCAST_TLB_FLUSH
210