Kconfig 104 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183
  1. # SPDX-License-Identifier: GPL-2.0
  2. # Select 32 or 64 bit
  3. config 64BIT
  4. bool "64-bit kernel" if "$(ARCH)" = "x86"
  5. default "$(ARCH)" != "i386"
  6. help
  7. Say yes to build a 64-bit kernel - formerly known as x86_64
  8. Say no to build a 32-bit kernel - formerly known as i386
  9. config X86_32
  10. def_bool y
  11. depends on !64BIT
  12. # Options that are inherently 32-bit kernel only:
  13. select ARCH_WANT_IPC_PARSE_VERSION
  14. select CLKSRC_I8253
  15. select CLONE_BACKWARDS
  16. select GENERIC_VDSO_32
  17. select HAVE_DEBUG_STACKOVERFLOW
  18. select KMAP_LOCAL
  19. select MODULES_USE_ELF_REL
  20. select OLD_SIGACTION
  21. select ARCH_SPLIT_ARG64
  22. config X86_64
  23. def_bool y
  24. depends on 64BIT
  25. # Options that are inherently 64-bit kernel only:
  26. select ARCH_HAS_GIGANTIC_PAGE
  27. select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
  28. select ARCH_SUPPORTS_PER_VMA_LOCK
  29. select ARCH_SUPPORTS_HUGE_PFNMAP if TRANSPARENT_HUGEPAGE
  30. select HAVE_ARCH_SOFT_DIRTY
  31. select MODULES_USE_ELF_RELA
  32. select NEED_DMA_MAP_STATE
  33. select SWIOTLB
  34. select ARCH_HAS_ELFCORE_COMPAT
  35. select ZONE_DMA32
  36. select EXECMEM if DYNAMIC_FTRACE
  37. config FORCE_DYNAMIC_FTRACE
  38. def_bool y
  39. depends on X86_32
  40. depends on FUNCTION_TRACER
  41. select DYNAMIC_FTRACE
  42. help
  43. We keep the static function tracing (!DYNAMIC_FTRACE) around
  44. in order to test the non static function tracing in the
  45. generic code, as other architectures still use it. But we
  46. only need to keep it around for x86_64. No need to keep it
  47. for x86_32. For x86_32, force DYNAMIC_FTRACE.
  48. #
  49. # Arch settings
  50. #
  51. # ( Note that options that are marked 'if X86_64' could in principle be
  52. # ported to 32-bit as well. )
  53. #
  54. config X86
  55. def_bool y
  56. #
  57. # Note: keep this list sorted alphabetically
  58. #
  59. select ACPI_LEGACY_TABLES_LOOKUP if ACPI
  60. select ACPI_SYSTEM_POWER_STATES_SUPPORT if ACPI
  61. select ACPI_HOTPLUG_CPU if ACPI_PROCESSOR && HOTPLUG_CPU
  62. select ARCH_32BIT_OFF_T if X86_32
  63. select ARCH_CLOCKSOURCE_INIT
  64. select ARCH_CONFIGURES_CPU_MITIGATIONS
  65. select ARCH_CORRECT_STACKTRACE_ON_KRETPROBE
  66. select ARCH_ENABLE_HUGEPAGE_MIGRATION if X86_64 && HUGETLB_PAGE && MIGRATION
  67. select ARCH_ENABLE_MEMORY_HOTPLUG if X86_64
  68. select ARCH_ENABLE_MEMORY_HOTREMOVE if MEMORY_HOTPLUG
  69. select ARCH_ENABLE_SPLIT_PMD_PTLOCK if (PGTABLE_LEVELS > 2) && (X86_64 || X86_PAE)
  70. select ARCH_ENABLE_THP_MIGRATION if X86_64 && TRANSPARENT_HUGEPAGE
  71. select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI
  72. select ARCH_HAS_CACHE_LINE_SIZE
  73. select ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION
  74. select ARCH_HAS_CPU_FINALIZE_INIT
  75. select ARCH_HAS_CPU_PASID if IOMMU_SVA
  76. select ARCH_HAS_CURRENT_STACK_POINTER
  77. select ARCH_HAS_DEBUG_VIRTUAL
  78. select ARCH_HAS_DEBUG_VM_PGTABLE if !X86_PAE
  79. select ARCH_HAS_DEVMEM_IS_ALLOWED
  80. select ARCH_HAS_DMA_OPS if GART_IOMMU || XEN
  81. select ARCH_HAS_EARLY_DEBUG if KGDB
  82. select ARCH_HAS_ELF_RANDOMIZE
  83. select ARCH_HAS_FAST_MULTIPLIER
  84. select ARCH_HAS_FORTIFY_SOURCE
  85. select ARCH_HAS_GCOV_PROFILE_ALL
  86. select ARCH_HAS_KCOV if X86_64
  87. select ARCH_HAS_KERNEL_FPU_SUPPORT
  88. select ARCH_HAS_MEM_ENCRYPT
  89. select ARCH_HAS_MEMBARRIER_SYNC_CORE
  90. select ARCH_HAS_NMI_SAFE_THIS_CPU_OPS
  91. select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
  92. select ARCH_HAS_PMEM_API if X86_64
  93. select ARCH_HAS_PTE_DEVMAP if X86_64
  94. select ARCH_HAS_PTE_SPECIAL
  95. select ARCH_HAS_HW_PTE_YOUNG
  96. select ARCH_HAS_NONLEAF_PMD_YOUNG if PGTABLE_LEVELS > 2
  97. select ARCH_HAS_UACCESS_FLUSHCACHE if X86_64
  98. select ARCH_HAS_COPY_MC if X86_64
  99. select ARCH_HAS_SET_MEMORY
  100. select ARCH_HAS_SET_DIRECT_MAP
  101. select ARCH_HAS_STRICT_KERNEL_RWX
  102. select ARCH_HAS_STRICT_MODULE_RWX
  103. select ARCH_HAS_SYNC_CORE_BEFORE_USERMODE
  104. select ARCH_HAS_SYSCALL_WRAPPER
  105. select ARCH_HAS_UBSAN
  106. select ARCH_HAS_DEBUG_WX
  107. select ARCH_HAS_ZONE_DMA_SET if EXPERT
  108. select ARCH_HAVE_NMI_SAFE_CMPXCHG
  109. select ARCH_HAVE_EXTRA_ELF_NOTES
  110. select ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE
  111. select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI
  112. select ARCH_MIGHT_HAVE_PC_PARPORT
  113. select ARCH_MIGHT_HAVE_PC_SERIO
  114. select ARCH_STACKWALK
  115. select ARCH_SUPPORTS_ACPI
  116. select ARCH_SUPPORTS_ATOMIC_RMW
  117. select ARCH_SUPPORTS_DEBUG_PAGEALLOC
  118. select ARCH_SUPPORTS_PAGE_TABLE_CHECK if X86_64
  119. select ARCH_SUPPORTS_NUMA_BALANCING if X86_64
  120. select ARCH_SUPPORTS_KMAP_LOCAL_FORCE_MAP if NR_CPUS <= 4096
  121. select ARCH_SUPPORTS_CFI_CLANG if X86_64
  122. select ARCH_USES_CFI_TRAPS if X86_64 && CFI_CLANG
  123. select ARCH_SUPPORTS_LTO_CLANG
  124. select ARCH_SUPPORTS_LTO_CLANG_THIN
  125. select ARCH_SUPPORTS_RT
  126. select ARCH_USE_BUILTIN_BSWAP
  127. select ARCH_USE_CMPXCHG_LOCKREF if X86_CMPXCHG64
  128. select ARCH_USE_MEMTEST
  129. select ARCH_USE_QUEUED_RWLOCKS
  130. select ARCH_USE_QUEUED_SPINLOCKS
  131. select ARCH_USE_SYM_ANNOTATIONS
  132. select ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
  133. select ARCH_WANT_DEFAULT_BPF_JIT if X86_64
  134. select ARCH_WANTS_DYNAMIC_TASK_STRUCT
  135. select ARCH_WANTS_NO_INSTR
  136. select ARCH_WANT_GENERAL_HUGETLB
  137. select ARCH_WANT_HUGE_PMD_SHARE
  138. select ARCH_WANT_LD_ORPHAN_WARN
  139. select ARCH_WANT_OPTIMIZE_DAX_VMEMMAP if X86_64
  140. select ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP if X86_64
  141. select ARCH_WANTS_THP_SWAP if X86_64
  142. select ARCH_HAS_PARANOID_L1D_FLUSH
  143. select BUILDTIME_TABLE_SORT
  144. select CLKEVT_I8253
  145. select CLOCKSOURCE_WATCHDOG
  146. # Word-size accesses may read uninitialized data past the trailing \0
  147. # in strings and cause false KMSAN reports.
  148. select DCACHE_WORD_ACCESS if !KMSAN
  149. select DYNAMIC_SIGFRAME
  150. select EDAC_ATOMIC_SCRUB
  151. select EDAC_SUPPORT
  152. select GENERIC_CLOCKEVENTS_BROADCAST if X86_64 || (X86_32 && X86_LOCAL_APIC)
  153. select GENERIC_CLOCKEVENTS_BROADCAST_IDLE if GENERIC_CLOCKEVENTS_BROADCAST
  154. select GENERIC_CLOCKEVENTS_MIN_ADJUST
  155. select GENERIC_CMOS_UPDATE
  156. select GENERIC_CPU_AUTOPROBE
  157. select GENERIC_CPU_DEVICES
  158. select GENERIC_CPU_VULNERABILITIES
  159. select GENERIC_EARLY_IOREMAP
  160. select GENERIC_ENTRY
  161. select GENERIC_IOMAP
  162. select GENERIC_IRQ_EFFECTIVE_AFF_MASK if SMP
  163. select GENERIC_IRQ_MATRIX_ALLOCATOR if X86_LOCAL_APIC
  164. select GENERIC_IRQ_MIGRATION if SMP
  165. select GENERIC_IRQ_PROBE
  166. select GENERIC_IRQ_RESERVATION_MODE
  167. select GENERIC_IRQ_SHOW
  168. select GENERIC_PENDING_IRQ if SMP
  169. select GENERIC_PTDUMP
  170. select GENERIC_SMP_IDLE_THREAD
  171. select GENERIC_TIME_VSYSCALL
  172. select GENERIC_GETTIMEOFDAY
  173. select GENERIC_VDSO_TIME_NS
  174. select GENERIC_VDSO_OVERFLOW_PROTECT
  175. select GUP_GET_PXX_LOW_HIGH if X86_PAE
  176. select HARDIRQS_SW_RESEND
  177. select HARDLOCKUP_CHECK_TIMESTAMP if X86_64
  178. select HAS_IOPORT
  179. select HAVE_ACPI_APEI if ACPI
  180. select HAVE_ACPI_APEI_NMI if ACPI
  181. select HAVE_ALIGNED_STRUCT_PAGE
  182. select HAVE_ARCH_AUDITSYSCALL
  183. select HAVE_ARCH_HUGE_VMAP if X86_64 || X86_PAE
  184. select HAVE_ARCH_HUGE_VMALLOC if X86_64
  185. select HAVE_ARCH_JUMP_LABEL
  186. select HAVE_ARCH_JUMP_LABEL_RELATIVE
  187. select HAVE_ARCH_KASAN if X86_64
  188. select HAVE_ARCH_KASAN_VMALLOC if X86_64
  189. select HAVE_ARCH_KFENCE
  190. select HAVE_ARCH_KMSAN if X86_64
  191. select HAVE_ARCH_KGDB
  192. select HAVE_ARCH_MMAP_RND_BITS if MMU
  193. select HAVE_ARCH_MMAP_RND_COMPAT_BITS if MMU && COMPAT
  194. select HAVE_ARCH_COMPAT_MMAP_BASES if MMU && COMPAT
  195. select HAVE_ARCH_PREL32_RELOCATIONS
  196. select HAVE_ARCH_SECCOMP_FILTER
  197. select HAVE_ARCH_THREAD_STRUCT_WHITELIST
  198. select HAVE_ARCH_STACKLEAK
  199. select HAVE_ARCH_TRACEHOOK
  200. select HAVE_ARCH_TRANSPARENT_HUGEPAGE
  201. select HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD if X86_64
  202. select HAVE_ARCH_USERFAULTFD_WP if X86_64 && USERFAULTFD
  203. select HAVE_ARCH_USERFAULTFD_MINOR if X86_64 && USERFAULTFD
  204. select HAVE_ARCH_VMAP_STACK if X86_64
  205. select HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
  206. select HAVE_ARCH_WITHIN_STACK_FRAMES
  207. select HAVE_ASM_MODVERSIONS
  208. select HAVE_CMPXCHG_DOUBLE
  209. select HAVE_CMPXCHG_LOCAL
  210. select HAVE_CONTEXT_TRACKING_USER if X86_64
  211. select HAVE_CONTEXT_TRACKING_USER_OFFSTACK if HAVE_CONTEXT_TRACKING_USER
  212. select HAVE_C_RECORDMCOUNT
  213. select HAVE_OBJTOOL_MCOUNT if HAVE_OBJTOOL
  214. select HAVE_OBJTOOL_NOP_MCOUNT if HAVE_OBJTOOL_MCOUNT
  215. select HAVE_BUILDTIME_MCOUNT_SORT
  216. select HAVE_DEBUG_KMEMLEAK
  217. select HAVE_DMA_CONTIGUOUS
  218. select HAVE_DYNAMIC_FTRACE
  219. select HAVE_DYNAMIC_FTRACE_WITH_REGS
  220. select HAVE_DYNAMIC_FTRACE_WITH_ARGS if X86_64
  221. select HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
  222. select HAVE_SAMPLE_FTRACE_DIRECT if X86_64
  223. select HAVE_SAMPLE_FTRACE_DIRECT_MULTI if X86_64
  224. select HAVE_EBPF_JIT
  225. select HAVE_EFFICIENT_UNALIGNED_ACCESS
  226. select HAVE_EISA
  227. select HAVE_EXIT_THREAD
  228. select HAVE_GUP_FAST
  229. select HAVE_FENTRY if X86_64 || DYNAMIC_FTRACE
  230. select HAVE_FTRACE_MCOUNT_RECORD
  231. select HAVE_FUNCTION_GRAPH_RETVAL if HAVE_FUNCTION_GRAPH_TRACER
  232. select HAVE_FUNCTION_GRAPH_TRACER if X86_32 || (X86_64 && DYNAMIC_FTRACE)
  233. select HAVE_FUNCTION_TRACER
  234. select HAVE_GCC_PLUGINS
  235. select HAVE_HW_BREAKPOINT
  236. select HAVE_IOREMAP_PROT
  237. select HAVE_IRQ_EXIT_ON_IRQ_STACK if X86_64
  238. select HAVE_IRQ_TIME_ACCOUNTING
  239. select HAVE_JUMP_LABEL_HACK if HAVE_OBJTOOL
  240. select HAVE_KERNEL_BZIP2
  241. select HAVE_KERNEL_GZIP
  242. select HAVE_KERNEL_LZ4
  243. select HAVE_KERNEL_LZMA
  244. select HAVE_KERNEL_LZO
  245. select HAVE_KERNEL_XZ
  246. select HAVE_KERNEL_ZSTD
  247. select HAVE_KPROBES
  248. select HAVE_KPROBES_ON_FTRACE
  249. select HAVE_FUNCTION_ERROR_INJECTION
  250. select HAVE_KRETPROBES
  251. select HAVE_RETHOOK
  252. select HAVE_LIVEPATCH if X86_64
  253. select HAVE_MIXED_BREAKPOINTS_REGS
  254. select HAVE_MOD_ARCH_SPECIFIC
  255. select HAVE_MOVE_PMD
  256. select HAVE_MOVE_PUD
  257. select HAVE_NOINSTR_HACK if HAVE_OBJTOOL
  258. select HAVE_NMI
  259. select HAVE_NOINSTR_VALIDATION if HAVE_OBJTOOL
  260. select HAVE_OBJTOOL if X86_64
  261. select HAVE_OPTPROBES
  262. select HAVE_PAGE_SIZE_4KB
  263. select HAVE_PCSPKR_PLATFORM
  264. select HAVE_PERF_EVENTS
  265. select HAVE_PERF_EVENTS_NMI
  266. select HAVE_HARDLOCKUP_DETECTOR_PERF if PERF_EVENTS && HAVE_PERF_EVENTS_NMI
  267. select HAVE_PCI
  268. select HAVE_PERF_REGS
  269. select HAVE_PERF_USER_STACK_DUMP
  270. select MMU_GATHER_RCU_TABLE_FREE if PARAVIRT
  271. select MMU_GATHER_MERGE_VMAS
  272. select HAVE_POSIX_CPU_TIMERS_TASK_WORK
  273. select HAVE_REGS_AND_STACK_ACCESS_API
  274. select HAVE_RELIABLE_STACKTRACE if UNWINDER_ORC || STACK_VALIDATION
  275. select HAVE_FUNCTION_ARG_ACCESS_API
  276. select HAVE_SETUP_PER_CPU_AREA
  277. select HAVE_SOFTIRQ_ON_OWN_STACK
  278. select HAVE_STACKPROTECTOR if CC_HAS_SANE_STACKPROTECTOR
  279. select HAVE_STACK_VALIDATION if HAVE_OBJTOOL
  280. select HAVE_STATIC_CALL
  281. select HAVE_STATIC_CALL_INLINE if HAVE_OBJTOOL
  282. select HAVE_PREEMPT_DYNAMIC_CALL
  283. select HAVE_RSEQ
  284. select HAVE_RUST if X86_64
  285. select HAVE_SYSCALL_TRACEPOINTS
  286. select HAVE_UACCESS_VALIDATION if HAVE_OBJTOOL
  287. select HAVE_UNSTABLE_SCHED_CLOCK
  288. select HAVE_USER_RETURN_NOTIFIER
  289. select HAVE_GENERIC_VDSO
  290. select VDSO_GETRANDOM if X86_64
  291. select HOTPLUG_PARALLEL if SMP && X86_64
  292. select HOTPLUG_SMT if SMP
  293. select HOTPLUG_SPLIT_STARTUP if SMP && X86_32
  294. select IRQ_FORCED_THREADING
  295. select LOCK_MM_AND_FIND_VMA
  296. select NEED_PER_CPU_EMBED_FIRST_CHUNK
  297. select NEED_PER_CPU_PAGE_FIRST_CHUNK
  298. select NEED_SG_DMA_LENGTH
  299. select NUMA_MEMBLKS if NUMA
  300. select PCI_DOMAINS if PCI
  301. select PCI_LOCKLESS_CONFIG if PCI
  302. select PERF_EVENTS
  303. select RTC_LIB
  304. select RTC_MC146818_LIB
  305. select SPARSE_IRQ
  306. select SYSCTL_EXCEPTION_TRACE
  307. select THREAD_INFO_IN_TASK
  308. select TRACE_IRQFLAGS_SUPPORT
  309. select TRACE_IRQFLAGS_NMI_SUPPORT
  310. select USER_STACKTRACE_SUPPORT
  311. select HAVE_ARCH_KCSAN if X86_64
  312. select PROC_PID_ARCH_STATUS if PROC_FS
  313. select HAVE_ARCH_NODE_DEV_GROUP if X86_SGX
  314. select FUNCTION_ALIGNMENT_16B if X86_64 || X86_ALIGNMENT_16
  315. select FUNCTION_ALIGNMENT_4B
  316. imply IMA_SECURE_AND_OR_TRUSTED_BOOT if EFI
  317. select HAVE_DYNAMIC_FTRACE_NO_PATCHABLE
  318. config INSTRUCTION_DECODER
  319. def_bool y
  320. depends on KPROBES || PERF_EVENTS || UPROBES
  321. config OUTPUT_FORMAT
  322. string
  323. default "elf32-i386" if X86_32
  324. default "elf64-x86-64" if X86_64
  325. config LOCKDEP_SUPPORT
  326. def_bool y
  327. config STACKTRACE_SUPPORT
  328. def_bool y
  329. config MMU
  330. def_bool y
  331. config ARCH_MMAP_RND_BITS_MIN
  332. default 28 if 64BIT
  333. default 8
  334. config ARCH_MMAP_RND_BITS_MAX
  335. default 32 if 64BIT
  336. default 16
  337. config ARCH_MMAP_RND_COMPAT_BITS_MIN
  338. default 8
  339. config ARCH_MMAP_RND_COMPAT_BITS_MAX
  340. default 16
  341. config SBUS
  342. bool
  343. config GENERIC_ISA_DMA
  344. def_bool y
  345. depends on ISA_DMA_API
  346. config GENERIC_CSUM
  347. bool
  348. default y if KMSAN || KASAN
  349. config GENERIC_BUG
  350. def_bool y
  351. depends on BUG
  352. select GENERIC_BUG_RELATIVE_POINTERS if X86_64
  353. config GENERIC_BUG_RELATIVE_POINTERS
  354. bool
  355. config ARCH_MAY_HAVE_PC_FDC
  356. def_bool y
  357. depends on ISA_DMA_API
  358. config GENERIC_CALIBRATE_DELAY
  359. def_bool y
  360. config ARCH_HAS_CPU_RELAX
  361. def_bool y
  362. config ARCH_HIBERNATION_POSSIBLE
  363. def_bool y
  364. config ARCH_SUSPEND_POSSIBLE
  365. def_bool y
  366. config AUDIT_ARCH
  367. def_bool y if X86_64
  368. config KASAN_SHADOW_OFFSET
  369. hex
  370. depends on KASAN
  371. default 0xdffffc0000000000
  372. config HAVE_INTEL_TXT
  373. def_bool y
  374. depends on INTEL_IOMMU && ACPI
  375. config X86_64_SMP
  376. def_bool y
  377. depends on X86_64 && SMP
  378. config ARCH_SUPPORTS_UPROBES
  379. def_bool y
  380. config FIX_EARLYCON_MEM
  381. def_bool y
  382. config DYNAMIC_PHYSICAL_MASK
  383. bool
  384. config PGTABLE_LEVELS
  385. int
  386. default 5 if X86_5LEVEL
  387. default 4 if X86_64
  388. default 3 if X86_PAE
  389. default 2
  390. config CC_HAS_SANE_STACKPROTECTOR
  391. bool
  392. default $(success,$(srctree)/scripts/gcc-x86_64-has-stack-protector.sh $(CC) $(CLANG_FLAGS)) if 64BIT
  393. default $(success,$(srctree)/scripts/gcc-x86_32-has-stack-protector.sh $(CC) $(CLANG_FLAGS))
  394. help
  395. We have to make sure stack protector is unconditionally disabled if
  396. the compiler produces broken code or if it does not let us control
  397. the segment on 32-bit kernels.
  398. menu "Processor type and features"
  399. config SMP
  400. bool "Symmetric multi-processing support"
  401. help
  402. This enables support for systems with more than one CPU. If you have
  403. a system with only one CPU, say N. If you have a system with more
  404. than one CPU, say Y.
  405. If you say N here, the kernel will run on uni- and multiprocessor
  406. machines, but will use only one CPU of a multiprocessor machine. If
  407. you say Y here, the kernel will run on many, but not all,
  408. uniprocessor machines. On a uniprocessor machine, the kernel
  409. will run faster if you say N here.
  410. Note that if you say Y here and choose architecture "586" or
  411. "Pentium" under "Processor family", the kernel will not work on 486
  412. architectures. Similarly, multiprocessor kernels for the "PPro"
  413. architecture may not work on all Pentium based boards.
  414. People using multiprocessor machines who say Y here should also say
  415. Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
  416. Management" code will be disabled if you say Y here.
  417. See also <file:Documentation/arch/x86/i386/IO-APIC.rst>,
  418. <file:Documentation/admin-guide/lockup-watchdogs.rst> and the SMP-HOWTO available at
  419. <http://www.tldp.org/docs.html#howto>.
  420. If you don't know what to do here, say N.
  421. config X86_X2APIC
  422. bool "Support x2apic"
  423. depends on X86_LOCAL_APIC && X86_64 && (IRQ_REMAP || HYPERVISOR_GUEST)
  424. help
  425. This enables x2apic support on CPUs that have this feature.
  426. This allows 32-bit apic IDs (so it can support very large systems),
  427. and accesses the local apic via MSRs not via mmio.
  428. Some Intel systems circa 2022 and later are locked into x2APIC mode
  429. and can not fall back to the legacy APIC modes if SGX or TDX are
  430. enabled in the BIOS. They will boot with very reduced functionality
  431. without enabling this option.
  432. If you don't know what to do here, say N.
  433. config X86_POSTED_MSI
  434. bool "Enable MSI and MSI-x delivery by posted interrupts"
  435. depends on X86_64 && IRQ_REMAP
  436. help
  437. This enables MSIs that are under interrupt remapping to be delivered as
  438. posted interrupts to the host kernel. Interrupt throughput can
  439. potentially be improved by coalescing CPU notifications during high
  440. frequency bursts.
  441. If you don't know what to do here, say N.
  442. config X86_MPPARSE
  443. bool "Enable MPS table" if ACPI
  444. default y
  445. depends on X86_LOCAL_APIC
  446. help
  447. For old smp systems that do not have proper acpi support. Newer systems
  448. (esp with 64bit cpus) with acpi support, MADT and DSDT will override it
  449. config X86_CPU_RESCTRL
  450. bool "x86 CPU resource control support"
  451. depends on X86 && (CPU_SUP_INTEL || CPU_SUP_AMD)
  452. select KERNFS
  453. select PROC_CPU_RESCTRL if PROC_FS
  454. help
  455. Enable x86 CPU resource control support.
  456. Provide support for the allocation and monitoring of system resources
  457. usage by the CPU.
  458. Intel calls this Intel Resource Director Technology
  459. (Intel(R) RDT). More information about RDT can be found in the
  460. Intel x86 Architecture Software Developer Manual.
  461. AMD calls this AMD Platform Quality of Service (AMD QoS).
  462. More information about AMD QoS can be found in the AMD64 Technology
  463. Platform Quality of Service Extensions manual.
  464. Say N if unsure.
  465. config X86_FRED
  466. bool "Flexible Return and Event Delivery"
  467. depends on X86_64
  468. help
  469. When enabled, try to use Flexible Return and Event Delivery
  470. instead of the legacy SYSCALL/SYSENTER/IDT architecture for
  471. ring transitions and exception/interrupt handling if the
  472. system supports it.
  473. config X86_BIGSMP
  474. bool "Support for big SMP systems with more than 8 CPUs"
  475. depends on SMP && X86_32
  476. help
  477. This option is needed for the systems that have more than 8 CPUs.
  478. config X86_EXTENDED_PLATFORM
  479. bool "Support for extended (non-PC) x86 platforms"
  480. default y
  481. help
  482. If you disable this option then the kernel will only support
  483. standard PC platforms. (which covers the vast majority of
  484. systems out there.)
  485. If you enable this option then you'll be able to select support
  486. for the following non-PC x86 platforms, depending on the value of
  487. CONFIG_64BIT.
  488. 32-bit platforms (CONFIG_64BIT=n):
  489. Goldfish (Android emulator)
  490. AMD Elan
  491. RDC R-321x SoC
  492. SGI 320/540 (Visual Workstation)
  493. STA2X11-based (e.g. Northville)
  494. Moorestown MID devices
  495. 64-bit platforms (CONFIG_64BIT=y):
  496. Numascale NumaChip
  497. ScaleMP vSMP
  498. SGI Ultraviolet
  499. If you have one of these systems, or if you want to build a
  500. generic distribution kernel, say Y here - otherwise say N.
  501. # This is an alphabetically sorted list of 64 bit extended platforms
  502. # Please maintain the alphabetic order if and when there are additions
  503. config X86_NUMACHIP
  504. bool "Numascale NumaChip"
  505. depends on X86_64
  506. depends on X86_EXTENDED_PLATFORM
  507. depends on NUMA
  508. depends on SMP
  509. depends on X86_X2APIC
  510. depends on PCI_MMCONFIG
  511. help
  512. Adds support for Numascale NumaChip large-SMP systems. Needed to
  513. enable more than ~168 cores.
  514. If you don't have one of these, you should say N here.
  515. config X86_VSMP
  516. bool "ScaleMP vSMP"
  517. select HYPERVISOR_GUEST
  518. select PARAVIRT
  519. depends on X86_64 && PCI
  520. depends on X86_EXTENDED_PLATFORM
  521. depends on SMP
  522. help
  523. Support for ScaleMP vSMP systems. Say 'Y' here if this kernel is
  524. supposed to run on these EM64T-based machines. Only choose this option
  525. if you have one of these machines.
  526. config X86_UV
  527. bool "SGI Ultraviolet"
  528. depends on X86_64
  529. depends on X86_EXTENDED_PLATFORM
  530. depends on NUMA
  531. depends on EFI
  532. depends on KEXEC_CORE
  533. depends on X86_X2APIC
  534. depends on PCI
  535. help
  536. This option is needed in order to support SGI Ultraviolet systems.
  537. If you don't have one of these, you should say N here.
  538. # Following is an alphabetically sorted list of 32 bit extended platforms
  539. # Please maintain the alphabetic order if and when there are additions
  540. config X86_GOLDFISH
  541. bool "Goldfish (Virtual Platform)"
  542. depends on X86_EXTENDED_PLATFORM
  543. help
  544. Enable support for the Goldfish virtual platform used primarily
  545. for Android development. Unless you are building for the Android
  546. Goldfish emulator say N here.
  547. config X86_INTEL_CE
  548. bool "CE4100 TV platform"
  549. depends on PCI
  550. depends on PCI_GODIRECT
  551. depends on X86_IO_APIC
  552. depends on X86_32
  553. depends on X86_EXTENDED_PLATFORM
  554. select X86_REBOOTFIXUPS
  555. select OF
  556. select OF_EARLY_FLATTREE
  557. help
  558. Select for the Intel CE media processor (CE4100) SOC.
  559. This option compiles in support for the CE4100 SOC for settop
  560. boxes and media devices.
  561. config X86_INTEL_MID
  562. bool "Intel MID platform support"
  563. depends on X86_EXTENDED_PLATFORM
  564. depends on X86_PLATFORM_DEVICES
  565. depends on PCI
  566. depends on X86_64 || (PCI_GOANY && X86_32)
  567. depends on X86_IO_APIC
  568. select I2C
  569. select DW_APB_TIMER
  570. select INTEL_SCU_PCI
  571. help
  572. Select to build a kernel capable of supporting Intel MID (Mobile
  573. Internet Device) platform systems which do not have the PCI legacy
  574. interfaces. If you are building for a PC class system say N here.
  575. Intel MID platforms are based on an Intel processor and chipset which
  576. consume less power than most of the x86 derivatives.
  577. config X86_INTEL_QUARK
  578. bool "Intel Quark platform support"
  579. depends on X86_32
  580. depends on X86_EXTENDED_PLATFORM
  581. depends on X86_PLATFORM_DEVICES
  582. depends on X86_TSC
  583. depends on PCI
  584. depends on PCI_GOANY
  585. depends on X86_IO_APIC
  586. select IOSF_MBI
  587. select INTEL_IMR
  588. select COMMON_CLK
  589. help
  590. Select to include support for Quark X1000 SoC.
  591. Say Y here if you have a Quark based system such as the Arduino
  592. compatible Intel Galileo.
  593. config X86_INTEL_LPSS
  594. bool "Intel Low Power Subsystem Support"
  595. depends on X86 && ACPI && PCI
  596. select COMMON_CLK
  597. select PINCTRL
  598. select IOSF_MBI
  599. help
  600. Select to build support for Intel Low Power Subsystem such as
  601. found on Intel Lynxpoint PCH. Selecting this option enables
  602. things like clock tree (common clock framework) and pincontrol
  603. which are needed by the LPSS peripheral drivers.
  604. config X86_AMD_PLATFORM_DEVICE
  605. bool "AMD ACPI2Platform devices support"
  606. depends on ACPI
  607. select COMMON_CLK
  608. select PINCTRL
  609. help
  610. Select to interpret AMD specific ACPI device to platform device
  611. such as I2C, UART, GPIO found on AMD Carrizo and later chipsets.
  612. I2C and UART depend on COMMON_CLK to set clock. GPIO driver is
  613. implemented under PINCTRL subsystem.
  614. config IOSF_MBI
  615. tristate "Intel SoC IOSF Sideband support for SoC platforms"
  616. depends on PCI
  617. help
  618. This option enables sideband register access support for Intel SoC
  619. platforms. On these platforms the IOSF sideband is used in lieu of
  620. MSR's for some register accesses, mostly but not limited to thermal
  621. and power. Drivers may query the availability of this device to
  622. determine if they need the sideband in order to work on these
  623. platforms. The sideband is available on the following SoC products.
  624. This list is not meant to be exclusive.
  625. - BayTrail
  626. - Braswell
  627. - Quark
  628. You should say Y if you are running a kernel on one of these SoC's.
  629. config IOSF_MBI_DEBUG
  630. bool "Enable IOSF sideband access through debugfs"
  631. depends on IOSF_MBI && DEBUG_FS
  632. help
  633. Select this option to expose the IOSF sideband access registers (MCR,
  634. MDR, MCRX) through debugfs to write and read register information from
  635. different units on the SoC. This is most useful for obtaining device
  636. state information for debug and analysis. As this is a general access
  637. mechanism, users of this option would have specific knowledge of the
  638. device they want to access.
  639. If you don't require the option or are in doubt, say N.
  640. config X86_RDC321X
  641. bool "RDC R-321x SoC"
  642. depends on X86_32
  643. depends on X86_EXTENDED_PLATFORM
  644. select M486
  645. select X86_REBOOTFIXUPS
  646. help
  647. This option is needed for RDC R-321x system-on-chip, also known
  648. as R-8610-(G).
  649. If you don't have one of these chips, you should say N here.
  650. config X86_32_NON_STANDARD
  651. bool "Support non-standard 32-bit SMP architectures"
  652. depends on X86_32 && SMP
  653. depends on X86_EXTENDED_PLATFORM
  654. help
  655. This option compiles in the bigsmp and STA2X11 default
  656. subarchitectures. It is intended for a generic binary
  657. kernel. If you select them all, kernel will probe it one by
  658. one and will fallback to default.
  659. # Alphabetically sorted list of Non standard 32 bit platforms
  660. config X86_SUPPORTS_MEMORY_FAILURE
  661. def_bool y
  662. # MCE code calls memory_failure():
  663. depends on X86_MCE
  664. # On 32-bit this adds too big of NODES_SHIFT and we run out of page flags:
  665. # On 32-bit SPARSEMEM adds too big of SECTIONS_WIDTH:
  666. depends on X86_64 || !SPARSEMEM
  667. select ARCH_SUPPORTS_MEMORY_FAILURE
  668. config STA2X11
  669. bool "STA2X11 Companion Chip Support"
  670. depends on X86_32_NON_STANDARD && PCI
  671. select SWIOTLB
  672. select MFD_STA2X11
  673. select GPIOLIB
  674. help
  675. This adds support for boards based on the STA2X11 IO-Hub,
  676. a.k.a. "ConneXt". The chip is used in place of the standard
  677. PC chipset, so all "standard" peripherals are missing. If this
  678. option is selected the kernel will still be able to boot on
  679. standard PC machines.
  680. config X86_32_IRIS
  681. tristate "Eurobraille/Iris poweroff module"
  682. depends on X86_32
  683. help
  684. The Iris machines from EuroBraille do not have APM or ACPI support
  685. to shut themselves down properly. A special I/O sequence is
  686. needed to do so, which is what this module does at
  687. kernel shutdown.
  688. This is only for Iris machines from EuroBraille.
  689. If unused, say N.
  690. config SCHED_OMIT_FRAME_POINTER
  691. def_bool y
  692. prompt "Single-depth WCHAN output"
  693. depends on X86
  694. help
  695. Calculate simpler /proc/<PID>/wchan values. If this option
  696. is disabled then wchan values will recurse back to the
  697. caller function. This provides more accurate wchan values,
  698. at the expense of slightly more scheduling overhead.
  699. If in doubt, say "Y".
  700. menuconfig HYPERVISOR_GUEST
  701. bool "Linux guest support"
  702. help
  703. Say Y here to enable options for running Linux under various hyper-
  704. visors. This option enables basic hypervisor detection and platform
  705. setup.
  706. If you say N, all options in this submenu will be skipped and
  707. disabled, and Linux guest support won't be built in.
  708. if HYPERVISOR_GUEST
  709. config PARAVIRT
  710. bool "Enable paravirtualization code"
  711. depends on HAVE_STATIC_CALL
  712. help
  713. This changes the kernel so it can modify itself when it is run
  714. under a hypervisor, potentially improving performance significantly
  715. over full virtualization. However, when run without a hypervisor
  716. the kernel is theoretically slower and slightly larger.
  717. config PARAVIRT_XXL
  718. bool
  719. config PARAVIRT_DEBUG
  720. bool "paravirt-ops debugging"
  721. depends on PARAVIRT && DEBUG_KERNEL
  722. help
  723. Enable to debug paravirt_ops internals. Specifically, BUG if
  724. a paravirt_op is missing when it is called.
  725. config PARAVIRT_SPINLOCKS
  726. bool "Paravirtualization layer for spinlocks"
  727. depends on PARAVIRT && SMP
  728. help
  729. Paravirtualized spinlocks allow a pvops backend to replace the
  730. spinlock implementation with something virtualization-friendly
  731. (for example, block the virtual CPU rather than spinning).
  732. It has a minimal impact on native kernels and gives a nice performance
  733. benefit on paravirtualized KVM / Xen kernels.
  734. If you are unsure how to answer this question, answer Y.
  735. config X86_HV_CALLBACK_VECTOR
  736. def_bool n
  737. source "arch/x86/xen/Kconfig"
  738. config KVM_GUEST
  739. bool "KVM Guest support (including kvmclock)"
  740. depends on PARAVIRT
  741. select PARAVIRT_CLOCK
  742. select ARCH_CPUIDLE_HALTPOLL
  743. select X86_HV_CALLBACK_VECTOR
  744. default y
  745. help
  746. This option enables various optimizations for running under the KVM
  747. hypervisor. It includes a paravirtualized clock, so that instead
  748. of relying on a PIT (or probably other) emulation by the
  749. underlying device model, the host provides the guest with
  750. timing infrastructure such as time of day, and system time
  751. config ARCH_CPUIDLE_HALTPOLL
  752. def_bool n
  753. prompt "Disable host haltpoll when loading haltpoll driver"
  754. help
  755. If virtualized under KVM, disable host haltpoll.
  756. config PVH
  757. bool "Support for running PVH guests"
  758. help
  759. This option enables the PVH entry point for guest virtual machines
  760. as specified in the x86/HVM direct boot ABI.
  761. config PARAVIRT_TIME_ACCOUNTING
  762. bool "Paravirtual steal time accounting"
  763. depends on PARAVIRT
  764. help
  765. Select this option to enable fine granularity task steal time
  766. accounting. Time spent executing other tasks in parallel with
  767. the current vCPU is discounted from the vCPU power. To account for
  768. that, there can be a small performance impact.
  769. If in doubt, say N here.
  770. config PARAVIRT_CLOCK
  771. bool
  772. config JAILHOUSE_GUEST
  773. bool "Jailhouse non-root cell support"
  774. depends on X86_64 && PCI
  775. select X86_PM_TIMER
  776. help
  777. This option allows to run Linux as guest in a Jailhouse non-root
  778. cell. You can leave this option disabled if you only want to start
  779. Jailhouse and run Linux afterwards in the root cell.
  780. config ACRN_GUEST
  781. bool "ACRN Guest support"
  782. depends on X86_64
  783. select X86_HV_CALLBACK_VECTOR
  784. help
  785. This option allows to run Linux as guest in the ACRN hypervisor. ACRN is
  786. a flexible, lightweight reference open-source hypervisor, built with
  787. real-time and safety-criticality in mind. It is built for embedded
  788. IOT with small footprint and real-time features. More details can be
  789. found in https://projectacrn.org/.
  790. config INTEL_TDX_GUEST
  791. bool "Intel TDX (Trust Domain Extensions) - Guest Support"
  792. depends on X86_64 && CPU_SUP_INTEL
  793. depends on X86_X2APIC
  794. depends on EFI_STUB
  795. select ARCH_HAS_CC_PLATFORM
  796. select X86_MEM_ENCRYPT
  797. select X86_MCE
  798. select UNACCEPTED_MEMORY
  799. help
  800. Support running as a guest under Intel TDX. Without this support,
  801. the guest kernel can not boot or run under TDX.
  802. TDX includes memory encryption and integrity capabilities
  803. which protect the confidentiality and integrity of guest
  804. memory contents and CPU state. TDX guests are protected from
  805. some attacks from the VMM.
  806. endif # HYPERVISOR_GUEST
  807. source "arch/x86/Kconfig.cpu"
  808. config HPET_TIMER
  809. def_bool X86_64
  810. prompt "HPET Timer Support" if X86_32
  811. help
  812. Use the IA-PC HPET (High Precision Event Timer) to manage
  813. time in preference to the PIT and RTC, if a HPET is
  814. present.
  815. HPET is the next generation timer replacing legacy 8254s.
  816. The HPET provides a stable time base on SMP
  817. systems, unlike the TSC, but it is more expensive to access,
  818. as it is off-chip. The interface used is documented
  819. in the HPET spec, revision 1.
  820. You can safely choose Y here. However, HPET will only be
  821. activated if the platform and the BIOS support this feature.
  822. Otherwise the 8254 will be used for timing services.
  823. Choose N to continue using the legacy 8254 timer.
  824. config HPET_EMULATE_RTC
  825. def_bool y
  826. depends on HPET_TIMER && (RTC_DRV_CMOS=m || RTC_DRV_CMOS=y)
  827. # Mark as expert because too many people got it wrong.
  828. # The code disables itself when not needed.
  829. config DMI
  830. default y
  831. select DMI_SCAN_MACHINE_NON_EFI_FALLBACK
  832. bool "Enable DMI scanning" if EXPERT
  833. help
  834. Enabled scanning of DMI to identify machine quirks. Say Y
  835. here unless you have verified that your setup is not
  836. affected by entries in the DMI blacklist. Required by PNP
  837. BIOS code.
  838. config GART_IOMMU
  839. bool "Old AMD GART IOMMU support"
  840. select IOMMU_HELPER
  841. select SWIOTLB
  842. depends on X86_64 && PCI && AMD_NB
  843. help
  844. Provides a driver for older AMD Athlon64/Opteron/Turion/Sempron
  845. GART based hardware IOMMUs.
  846. The GART supports full DMA access for devices with 32-bit access
  847. limitations, on systems with more than 3 GB. This is usually needed
  848. for USB, sound, many IDE/SATA chipsets and some other devices.
  849. Newer systems typically have a modern AMD IOMMU, supported via
  850. the CONFIG_AMD_IOMMU=y config option.
  851. In normal configurations this driver is only active when needed:
  852. there's more than 3 GB of memory and the system contains a
  853. 32-bit limited device.
  854. If unsure, say Y.
  855. config BOOT_VESA_SUPPORT
  856. bool
  857. help
  858. If true, at least one selected framebuffer driver can take advantage
  859. of VESA video modes set at an early boot stage via the vga= parameter.
  860. config MAXSMP
  861. bool "Enable Maximum number of SMP Processors and NUMA Nodes"
  862. depends on X86_64 && SMP && DEBUG_KERNEL
  863. select CPUMASK_OFFSTACK
  864. help
  865. Enable maximum number of CPUS and NUMA Nodes for this architecture.
  866. If unsure, say N.
  867. #
  868. # The maximum number of CPUs supported:
  869. #
  870. # The main config value is NR_CPUS, which defaults to NR_CPUS_DEFAULT,
  871. # and which can be configured interactively in the
  872. # [NR_CPUS_RANGE_BEGIN ... NR_CPUS_RANGE_END] range.
  873. #
  874. # The ranges are different on 32-bit and 64-bit kernels, depending on
  875. # hardware capabilities and scalability features of the kernel.
  876. #
  877. # ( If MAXSMP is enabled we just use the highest possible value and disable
  878. # interactive configuration. )
  879. #
  880. config NR_CPUS_RANGE_BEGIN
  881. int
  882. default NR_CPUS_RANGE_END if MAXSMP
  883. default 1 if !SMP
  884. default 2
  885. config NR_CPUS_RANGE_END
  886. int
  887. depends on X86_32
  888. default 64 if SMP && X86_BIGSMP
  889. default 8 if SMP && !X86_BIGSMP
  890. default 1 if !SMP
  891. config NR_CPUS_RANGE_END
  892. int
  893. depends on X86_64
  894. default 8192 if SMP && CPUMASK_OFFSTACK
  895. default 512 if SMP && !CPUMASK_OFFSTACK
  896. default 1 if !SMP
  897. config NR_CPUS_DEFAULT
  898. int
  899. depends on X86_32
  900. default 32 if X86_BIGSMP
  901. default 8 if SMP
  902. default 1 if !SMP
  903. config NR_CPUS_DEFAULT
  904. int
  905. depends on X86_64
  906. default 8192 if MAXSMP
  907. default 64 if SMP
  908. default 1 if !SMP
  909. config NR_CPUS
  910. int "Maximum number of CPUs" if SMP && !MAXSMP
  911. range NR_CPUS_RANGE_BEGIN NR_CPUS_RANGE_END
  912. default NR_CPUS_DEFAULT
  913. help
  914. This allows you to specify the maximum number of CPUs which this
  915. kernel will support. If CPUMASK_OFFSTACK is enabled, the maximum
  916. supported value is 8192, otherwise the maximum value is 512. The
  917. minimum value which makes sense is 2.
  918. This is purely to save memory: each supported CPU adds about 8KB
  919. to the kernel image.
  920. config SCHED_CLUSTER
  921. bool "Cluster scheduler support"
  922. depends on SMP
  923. default y
  924. help
  925. Cluster scheduler support improves the CPU scheduler's decision
  926. making when dealing with machines that have clusters of CPUs.
  927. Cluster usually means a couple of CPUs which are placed closely
  928. by sharing mid-level caches, last-level cache tags or internal
  929. busses.
  930. config SCHED_SMT
  931. def_bool y if SMP
  932. config SCHED_MC
  933. def_bool y
  934. prompt "Multi-core scheduler support"
  935. depends on SMP
  936. help
  937. Multi-core scheduler support improves the CPU scheduler's decision
  938. making when dealing with multi-core CPU chips at a cost of slightly
  939. increased overhead in some places. If unsure say N here.
  940. config SCHED_MC_PRIO
  941. bool "CPU core priorities scheduler support"
  942. depends on SCHED_MC
  943. select X86_INTEL_PSTATE if CPU_SUP_INTEL
  944. select X86_AMD_PSTATE if CPU_SUP_AMD && ACPI
  945. select CPU_FREQ
  946. default y
  947. help
  948. Intel Turbo Boost Max Technology 3.0 enabled CPUs have a
  949. core ordering determined at manufacturing time, which allows
  950. certain cores to reach higher turbo frequencies (when running
  951. single threaded workloads) than others.
  952. Enabling this kernel feature teaches the scheduler about
  953. the TBM3 (aka ITMT) priority order of the CPU cores and adjusts the
  954. scheduler's CPU selection logic accordingly, so that higher
  955. overall system performance can be achieved.
  956. This feature will have no effect on CPUs without this feature.
  957. If unsure say Y here.
  958. config UP_LATE_INIT
  959. def_bool y
  960. depends on !SMP && X86_LOCAL_APIC
  961. config X86_UP_APIC
  962. bool "Local APIC support on uniprocessors" if !PCI_MSI
  963. default PCI_MSI
  964. depends on X86_32 && !SMP && !X86_32_NON_STANDARD
  965. help
  966. A local APIC (Advanced Programmable Interrupt Controller) is an
  967. integrated interrupt controller in the CPU. If you have a single-CPU
  968. system which has a processor with a local APIC, you can say Y here to
  969. enable and use it. If you say Y here even though your machine doesn't
  970. have a local APIC, then the kernel will still run with no slowdown at
  971. all. The local APIC supports CPU-generated self-interrupts (timer,
  972. performance counters), and the NMI watchdog which detects hard
  973. lockups.
  974. config X86_UP_IOAPIC
  975. bool "IO-APIC support on uniprocessors"
  976. depends on X86_UP_APIC
  977. help
  978. An IO-APIC (I/O Advanced Programmable Interrupt Controller) is an
  979. SMP-capable replacement for PC-style interrupt controllers. Most
  980. SMP systems and many recent uniprocessor systems have one.
  981. If you have a single-CPU system with an IO-APIC, you can say Y here
  982. to use it. If you say Y here even though your machine doesn't have
  983. an IO-APIC, then the kernel will still run with no slowdown at all.
  984. config X86_LOCAL_APIC
  985. def_bool y
  986. depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_APIC || PCI_MSI
  987. select IRQ_DOMAIN_HIERARCHY
  988. config ACPI_MADT_WAKEUP
  989. def_bool y
  990. depends on X86_64
  991. depends on ACPI
  992. depends on SMP
  993. depends on X86_LOCAL_APIC
  994. config X86_IO_APIC
  995. def_bool y
  996. depends on X86_LOCAL_APIC || X86_UP_IOAPIC
  997. config X86_REROUTE_FOR_BROKEN_BOOT_IRQS
  998. bool "Reroute for broken boot IRQs"
  999. depends on X86_IO_APIC
  1000. help
  1001. This option enables a workaround that fixes a source of
  1002. spurious interrupts. This is recommended when threaded
  1003. interrupt handling is used on systems where the generation of
  1004. superfluous "boot interrupts" cannot be disabled.
  1005. Some chipsets generate a legacy INTx "boot IRQ" when the IRQ
  1006. entry in the chipset's IO-APIC is masked (as, e.g. the RT
  1007. kernel does during interrupt handling). On chipsets where this
  1008. boot IRQ generation cannot be disabled, this workaround keeps
  1009. the original IRQ line masked so that only the equivalent "boot
  1010. IRQ" is delivered to the CPUs. The workaround also tells the
  1011. kernel to set up the IRQ handler on the boot IRQ line. In this
  1012. way only one interrupt is delivered to the kernel. Otherwise
  1013. the spurious second interrupt may cause the kernel to bring
  1014. down (vital) interrupt lines.
  1015. Only affects "broken" chipsets. Interrupt sharing may be
  1016. increased on these systems.
  1017. config X86_MCE
  1018. bool "Machine Check / overheating reporting"
  1019. select GENERIC_ALLOCATOR
  1020. default y
  1021. help
  1022. Machine Check support allows the processor to notify the
  1023. kernel if it detects a problem (e.g. overheating, data corruption).
  1024. The action the kernel takes depends on the severity of the problem,
  1025. ranging from warning messages to halting the machine.
  1026. config X86_MCELOG_LEGACY
  1027. bool "Support for deprecated /dev/mcelog character device"
  1028. depends on X86_MCE
  1029. help
  1030. Enable support for /dev/mcelog which is needed by the old mcelog
  1031. userspace logging daemon. Consider switching to the new generation
  1032. rasdaemon solution.
  1033. config X86_MCE_INTEL
  1034. def_bool y
  1035. prompt "Intel MCE features"
  1036. depends on X86_MCE && X86_LOCAL_APIC
  1037. help
  1038. Additional support for intel specific MCE features such as
  1039. the thermal monitor.
  1040. config X86_MCE_AMD
  1041. def_bool y
  1042. prompt "AMD MCE features"
  1043. depends on X86_MCE && X86_LOCAL_APIC && AMD_NB
  1044. help
  1045. Additional support for AMD specific MCE features such as
  1046. the DRAM Error Threshold.
  1047. config X86_ANCIENT_MCE
  1048. bool "Support for old Pentium 5 / WinChip machine checks"
  1049. depends on X86_32 && X86_MCE
  1050. help
  1051. Include support for machine check handling on old Pentium 5 or WinChip
  1052. systems. These typically need to be enabled explicitly on the command
  1053. line.
  1054. config X86_MCE_THRESHOLD
  1055. depends on X86_MCE_AMD || X86_MCE_INTEL
  1056. def_bool y
  1057. config X86_MCE_INJECT
  1058. depends on X86_MCE && X86_LOCAL_APIC && DEBUG_FS
  1059. tristate "Machine check injector support"
  1060. help
  1061. Provide support for injecting machine checks for testing purposes.
  1062. If you don't know what a machine check is and you don't do kernel
  1063. QA it is safe to say n.
  1064. source "arch/x86/events/Kconfig"
  1065. config X86_LEGACY_VM86
  1066. bool "Legacy VM86 support"
  1067. depends on X86_32
  1068. help
  1069. This option allows user programs to put the CPU into V8086
  1070. mode, which is an 80286-era approximation of 16-bit real mode.
  1071. Some very old versions of X and/or vbetool require this option
  1072. for user mode setting. Similarly, DOSEMU will use it if
  1073. available to accelerate real mode DOS programs. However, any
  1074. recent version of DOSEMU, X, or vbetool should be fully
  1075. functional even without kernel VM86 support, as they will all
  1076. fall back to software emulation. Nevertheless, if you are using
  1077. a 16-bit DOS program where 16-bit performance matters, vm86
  1078. mode might be faster than emulation and you might want to
  1079. enable this option.
  1080. Note that any app that works on a 64-bit kernel is unlikely to
  1081. need this option, as 64-bit kernels don't, and can't, support
  1082. V8086 mode. This option is also unrelated to 16-bit protected
  1083. mode and is not needed to run most 16-bit programs under Wine.
  1084. Enabling this option increases the complexity of the kernel
  1085. and slows down exception handling a tiny bit.
  1086. If unsure, say N here.
  1087. config VM86
  1088. bool
  1089. default X86_LEGACY_VM86
  1090. config X86_16BIT
  1091. bool "Enable support for 16-bit segments" if EXPERT
  1092. default y
  1093. depends on MODIFY_LDT_SYSCALL
  1094. help
  1095. This option is required by programs like Wine to run 16-bit
  1096. protected mode legacy code on x86 processors. Disabling
  1097. this option saves about 300 bytes on i386, or around 6K text
  1098. plus 16K runtime memory on x86-64,
  1099. config X86_ESPFIX32
  1100. def_bool y
  1101. depends on X86_16BIT && X86_32
  1102. config X86_ESPFIX64
  1103. def_bool y
  1104. depends on X86_16BIT && X86_64
  1105. config X86_VSYSCALL_EMULATION
  1106. bool "Enable vsyscall emulation" if EXPERT
  1107. default y
  1108. depends on X86_64
  1109. help
  1110. This enables emulation of the legacy vsyscall page. Disabling
  1111. it is roughly equivalent to booting with vsyscall=none, except
  1112. that it will also disable the helpful warning if a program
  1113. tries to use a vsyscall. With this option set to N, offending
  1114. programs will just segfault, citing addresses of the form
  1115. 0xffffffffff600?00.
  1116. This option is required by many programs built before 2013, and
  1117. care should be used even with newer programs if set to N.
  1118. Disabling this option saves about 7K of kernel size and
  1119. possibly 4K of additional runtime pagetable memory.
  1120. config X86_IOPL_IOPERM
  1121. bool "IOPERM and IOPL Emulation"
  1122. default y
  1123. help
  1124. This enables the ioperm() and iopl() syscalls which are necessary
  1125. for legacy applications.
  1126. Legacy IOPL support is an overbroad mechanism which allows user
  1127. space aside of accessing all 65536 I/O ports also to disable
  1128. interrupts. To gain this access the caller needs CAP_SYS_RAWIO
  1129. capabilities and permission from potentially active security
  1130. modules.
  1131. The emulation restricts the functionality of the syscall to
  1132. only allowing the full range I/O port access, but prevents the
  1133. ability to disable interrupts from user space which would be
  1134. granted if the hardware IOPL mechanism would be used.
  1135. config TOSHIBA
  1136. tristate "Toshiba Laptop support"
  1137. depends on X86_32
  1138. help
  1139. This adds a driver to safely access the System Management Mode of
  1140. the CPU on Toshiba portables with a genuine Toshiba BIOS. It does
  1141. not work on models with a Phoenix BIOS. The System Management Mode
  1142. is used to set the BIOS and power saving options on Toshiba portables.
  1143. For information on utilities to make use of this driver see the
  1144. Toshiba Linux utilities web site at:
  1145. <http://www.buzzard.org.uk/toshiba/>.
  1146. Say Y if you intend to run this kernel on a Toshiba portable.
  1147. Say N otherwise.
  1148. config X86_REBOOTFIXUPS
  1149. bool "Enable X86 board specific fixups for reboot"
  1150. depends on X86_32
  1151. help
  1152. This enables chipset and/or board specific fixups to be done
  1153. in order to get reboot to work correctly. This is only needed on
  1154. some combinations of hardware and BIOS. The symptom, for which
  1155. this config is intended, is when reboot ends with a stalled/hung
  1156. system.
  1157. Currently, the only fixup is for the Geode machines using
  1158. CS5530A and CS5536 chipsets and the RDC R-321x SoC.
  1159. Say Y if you want to enable the fixup. Currently, it's safe to
  1160. enable this option even if you don't need it.
  1161. Say N otherwise.
  1162. config MICROCODE
  1163. def_bool y
  1164. depends on CPU_SUP_AMD || CPU_SUP_INTEL
  1165. config MICROCODE_INITRD32
  1166. def_bool y
  1167. depends on MICROCODE && X86_32 && BLK_DEV_INITRD
  1168. config MICROCODE_LATE_LOADING
  1169. bool "Late microcode loading (DANGEROUS)"
  1170. default n
  1171. depends on MICROCODE && SMP
  1172. help
  1173. Loading microcode late, when the system is up and executing instructions
  1174. is a tricky business and should be avoided if possible. Just the sequence
  1175. of synchronizing all cores and SMT threads is one fragile dance which does
  1176. not guarantee that cores might not softlock after the loading. Therefore,
  1177. use this at your own risk. Late loading taints the kernel unless the
  1178. microcode header indicates that it is safe for late loading via the
  1179. minimal revision check. This minimal revision check can be enforced on
  1180. the kernel command line with "microcode.minrev=Y".
  1181. config MICROCODE_LATE_FORCE_MINREV
  1182. bool "Enforce late microcode loading minimal revision check"
  1183. default n
  1184. depends on MICROCODE_LATE_LOADING
  1185. help
  1186. To prevent that users load microcode late which modifies already
  1187. in use features, newer microcode patches have a minimum revision field
  1188. in the microcode header, which tells the kernel which minimum
  1189. revision must be active in the CPU to safely load that new microcode
  1190. late into the running system. If disabled the check will not
  1191. be enforced but the kernel will be tainted when the minimal
  1192. revision check fails.
  1193. This minimal revision check can also be controlled via the
  1194. "microcode.minrev" parameter on the kernel command line.
  1195. If unsure say Y.
  1196. config X86_MSR
  1197. tristate "/dev/cpu/*/msr - Model-specific register support"
  1198. help
  1199. This device gives privileged processes access to the x86
  1200. Model-Specific Registers (MSRs). It is a character device with
  1201. major 202 and minors 0 to 31 for /dev/cpu/0/msr to /dev/cpu/31/msr.
  1202. MSR accesses are directed to a specific CPU on multi-processor
  1203. systems.
  1204. config X86_CPUID
  1205. tristate "/dev/cpu/*/cpuid - CPU information support"
  1206. help
  1207. This device gives processes access to the x86 CPUID instruction to
  1208. be executed on a specific processor. It is a character device
  1209. with major 203 and minors 0 to 31 for /dev/cpu/0/cpuid to
  1210. /dev/cpu/31/cpuid.
  1211. choice
  1212. prompt "High Memory Support"
  1213. default HIGHMEM4G
  1214. depends on X86_32
  1215. config NOHIGHMEM
  1216. bool "off"
  1217. help
  1218. Linux can use up to 64 Gigabytes of physical memory on x86 systems.
  1219. However, the address space of 32-bit x86 processors is only 4
  1220. Gigabytes large. That means that, if you have a large amount of
  1221. physical memory, not all of it can be "permanently mapped" by the
  1222. kernel. The physical memory that's not permanently mapped is called
  1223. "high memory".
  1224. If you are compiling a kernel which will never run on a machine with
  1225. more than 1 Gigabyte total physical RAM, answer "off" here (default
  1226. choice and suitable for most users). This will result in a "3GB/1GB"
  1227. split: 3GB are mapped so that each process sees a 3GB virtual memory
  1228. space and the remaining part of the 4GB virtual memory space is used
  1229. by the kernel to permanently map as much physical memory as
  1230. possible.
  1231. If the machine has between 1 and 4 Gigabytes physical RAM, then
  1232. answer "4GB" here.
  1233. If more than 4 Gigabytes is used then answer "64GB" here. This
  1234. selection turns Intel PAE (Physical Address Extension) mode on.
  1235. PAE implements 3-level paging on IA32 processors. PAE is fully
  1236. supported by Linux, PAE mode is implemented on all recent Intel
  1237. processors (Pentium Pro and better). NOTE: If you say "64GB" here,
  1238. then the kernel will not boot on CPUs that don't support PAE!
  1239. The actual amount of total physical memory will either be
  1240. auto detected or can be forced by using a kernel command line option
  1241. such as "mem=256M". (Try "man bootparam" or see the documentation of
  1242. your boot loader (lilo or loadlin) about how to pass options to the
  1243. kernel at boot time.)
  1244. If unsure, say "off".
  1245. config HIGHMEM4G
  1246. bool "4GB"
  1247. help
  1248. Select this if you have a 32-bit processor and between 1 and 4
  1249. gigabytes of physical RAM.
  1250. config HIGHMEM64G
  1251. bool "64GB"
  1252. depends on X86_HAVE_PAE
  1253. select X86_PAE
  1254. help
  1255. Select this if you have a 32-bit processor and more than 4
  1256. gigabytes of physical RAM.
  1257. endchoice
  1258. choice
  1259. prompt "Memory split" if EXPERT
  1260. default VMSPLIT_3G
  1261. depends on X86_32
  1262. help
  1263. Select the desired split between kernel and user memory.
  1264. If the address range available to the kernel is less than the
  1265. physical memory installed, the remaining memory will be available
  1266. as "high memory". Accessing high memory is a little more costly
  1267. than low memory, as it needs to be mapped into the kernel first.
  1268. Note that increasing the kernel address space limits the range
  1269. available to user programs, making the address space there
  1270. tighter. Selecting anything other than the default 3G/1G split
  1271. will also likely make your kernel incompatible with binary-only
  1272. kernel modules.
  1273. If you are not absolutely sure what you are doing, leave this
  1274. option alone!
  1275. config VMSPLIT_3G
  1276. bool "3G/1G user/kernel split"
  1277. config VMSPLIT_3G_OPT
  1278. depends on !X86_PAE
  1279. bool "3G/1G user/kernel split (for full 1G low memory)"
  1280. config VMSPLIT_2G
  1281. bool "2G/2G user/kernel split"
  1282. config VMSPLIT_2G_OPT
  1283. depends on !X86_PAE
  1284. bool "2G/2G user/kernel split (for full 2G low memory)"
  1285. config VMSPLIT_1G
  1286. bool "1G/3G user/kernel split"
  1287. endchoice
  1288. config PAGE_OFFSET
  1289. hex
  1290. default 0xB0000000 if VMSPLIT_3G_OPT
  1291. default 0x80000000 if VMSPLIT_2G
  1292. default 0x78000000 if VMSPLIT_2G_OPT
  1293. default 0x40000000 if VMSPLIT_1G
  1294. default 0xC0000000
  1295. depends on X86_32
  1296. config HIGHMEM
  1297. def_bool y
  1298. depends on X86_32 && (HIGHMEM64G || HIGHMEM4G)
  1299. config X86_PAE
  1300. bool "PAE (Physical Address Extension) Support"
  1301. depends on X86_32 && X86_HAVE_PAE
  1302. select PHYS_ADDR_T_64BIT
  1303. select SWIOTLB
  1304. help
  1305. PAE is required for NX support, and furthermore enables
  1306. larger swapspace support for non-overcommit purposes. It
  1307. has the cost of more pagetable lookup overhead, and also
  1308. consumes more pagetable space per process.
  1309. config X86_5LEVEL
  1310. bool "Enable 5-level page tables support"
  1311. default y
  1312. select DYNAMIC_MEMORY_LAYOUT
  1313. select SPARSEMEM_VMEMMAP
  1314. depends on X86_64
  1315. help
  1316. 5-level paging enables access to larger address space:
  1317. up to 128 PiB of virtual address space and 4 PiB of
  1318. physical address space.
  1319. It will be supported by future Intel CPUs.
  1320. A kernel with the option enabled can be booted on machines that
  1321. support 4- or 5-level paging.
  1322. See Documentation/arch/x86/x86_64/5level-paging.rst for more
  1323. information.
  1324. Say N if unsure.
  1325. config X86_DIRECT_GBPAGES
  1326. def_bool y
  1327. depends on X86_64
  1328. help
  1329. Certain kernel features effectively disable kernel
  1330. linear 1 GB mappings (even if the CPU otherwise
  1331. supports them), so don't confuse the user by printing
  1332. that we have them enabled.
  1333. config X86_CPA_STATISTICS
  1334. bool "Enable statistic for Change Page Attribute"
  1335. depends on DEBUG_FS
  1336. help
  1337. Expose statistics about the Change Page Attribute mechanism, which
  1338. helps to determine the effectiveness of preserving large and huge
  1339. page mappings when mapping protections are changed.
  1340. config X86_MEM_ENCRYPT
  1341. select ARCH_HAS_FORCE_DMA_UNENCRYPTED
  1342. select DYNAMIC_PHYSICAL_MASK
  1343. def_bool n
  1344. config AMD_MEM_ENCRYPT
  1345. bool "AMD Secure Memory Encryption (SME) support"
  1346. depends on X86_64 && CPU_SUP_AMD
  1347. depends on EFI_STUB
  1348. select DMA_COHERENT_POOL
  1349. select ARCH_USE_MEMREMAP_PROT
  1350. select INSTRUCTION_DECODER
  1351. select ARCH_HAS_CC_PLATFORM
  1352. select X86_MEM_ENCRYPT
  1353. select UNACCEPTED_MEMORY
  1354. help
  1355. Say yes to enable support for the encryption of system memory.
  1356. This requires an AMD processor that supports Secure Memory
  1357. Encryption (SME).
  1358. # Common NUMA Features
  1359. config NUMA
  1360. bool "NUMA Memory Allocation and Scheduler Support"
  1361. depends on SMP
  1362. depends on X86_64 || (X86_32 && HIGHMEM64G && X86_BIGSMP)
  1363. default y if X86_BIGSMP
  1364. select USE_PERCPU_NUMA_NODE_ID
  1365. select OF_NUMA if OF
  1366. help
  1367. Enable NUMA (Non-Uniform Memory Access) support.
  1368. The kernel will try to allocate memory used by a CPU on the
  1369. local memory controller of the CPU and add some more
  1370. NUMA awareness to the kernel.
  1371. For 64-bit this is recommended if the system is Intel Core i7
  1372. (or later), AMD Opteron, or EM64T NUMA.
  1373. For 32-bit this is only needed if you boot a 32-bit
  1374. kernel on a 64-bit NUMA platform.
  1375. Otherwise, you should say N.
  1376. config AMD_NUMA
  1377. def_bool y
  1378. prompt "Old style AMD Opteron NUMA detection"
  1379. depends on X86_64 && NUMA && PCI
  1380. help
  1381. Enable AMD NUMA node topology detection. You should say Y here if
  1382. you have a multi processor AMD system. This uses an old method to
  1383. read the NUMA configuration directly from the builtin Northbridge
  1384. of Opteron. It is recommended to use X86_64_ACPI_NUMA instead,
  1385. which also takes priority if both are compiled in.
  1386. config X86_64_ACPI_NUMA
  1387. def_bool y
  1388. prompt "ACPI NUMA detection"
  1389. depends on X86_64 && NUMA && ACPI && PCI
  1390. select ACPI_NUMA
  1391. help
  1392. Enable ACPI SRAT based node topology detection.
  1393. config NODES_SHIFT
  1394. int "Maximum NUMA Nodes (as a power of 2)" if !MAXSMP
  1395. range 1 10
  1396. default "10" if MAXSMP
  1397. default "6" if X86_64
  1398. default "3"
  1399. depends on NUMA
  1400. help
  1401. Specify the maximum number of NUMA Nodes available on the target
  1402. system. Increases memory reserved to accommodate various tables.
  1403. config ARCH_FLATMEM_ENABLE
  1404. def_bool y
  1405. depends on X86_32 && !NUMA
  1406. config ARCH_SPARSEMEM_ENABLE
  1407. def_bool y
  1408. depends on X86_64 || NUMA || X86_32 || X86_32_NON_STANDARD
  1409. select SPARSEMEM_STATIC if X86_32
  1410. select SPARSEMEM_VMEMMAP_ENABLE if X86_64
  1411. config ARCH_SPARSEMEM_DEFAULT
  1412. def_bool X86_64 || (NUMA && X86_32)
  1413. config ARCH_SELECT_MEMORY_MODEL
  1414. def_bool y
  1415. depends on ARCH_SPARSEMEM_ENABLE && ARCH_FLATMEM_ENABLE
  1416. config ARCH_MEMORY_PROBE
  1417. bool "Enable sysfs memory/probe interface"
  1418. depends on MEMORY_HOTPLUG
  1419. help
  1420. This option enables a sysfs memory/probe interface for testing.
  1421. See Documentation/admin-guide/mm/memory-hotplug.rst for more information.
  1422. If you are unsure how to answer this question, answer N.
  1423. config ARCH_PROC_KCORE_TEXT
  1424. def_bool y
  1425. depends on X86_64 && PROC_KCORE
  1426. config ILLEGAL_POINTER_VALUE
  1427. hex
  1428. default 0 if X86_32
  1429. default 0xdead000000000000 if X86_64
  1430. config X86_PMEM_LEGACY_DEVICE
  1431. bool
  1432. config X86_PMEM_LEGACY
  1433. tristate "Support non-standard NVDIMMs and ADR protected memory"
  1434. depends on PHYS_ADDR_T_64BIT
  1435. depends on BLK_DEV
  1436. select X86_PMEM_LEGACY_DEVICE
  1437. select NUMA_KEEP_MEMINFO if NUMA
  1438. select LIBNVDIMM
  1439. help
  1440. Treat memory marked using the non-standard e820 type of 12 as used
  1441. by the Intel Sandy Bridge-EP reference BIOS as protected memory.
  1442. The kernel will offer these regions to the 'pmem' driver so
  1443. they can be used for persistent storage.
  1444. Say Y if unsure.
  1445. config HIGHPTE
  1446. bool "Allocate 3rd-level pagetables from highmem"
  1447. depends on HIGHMEM
  1448. help
  1449. The VM uses one page table entry for each page of physical memory.
  1450. For systems with a lot of RAM, this can be wasteful of precious
  1451. low memory. Setting this option will put user-space page table
  1452. entries in high memory.
  1453. config X86_CHECK_BIOS_CORRUPTION
  1454. bool "Check for low memory corruption"
  1455. help
  1456. Periodically check for memory corruption in low memory, which
  1457. is suspected to be caused by BIOS. Even when enabled in the
  1458. configuration, it is disabled at runtime. Enable it by
  1459. setting "memory_corruption_check=1" on the kernel command
  1460. line. By default it scans the low 64k of memory every 60
  1461. seconds; see the memory_corruption_check_size and
  1462. memory_corruption_check_period parameters in
  1463. Documentation/admin-guide/kernel-parameters.rst to adjust this.
  1464. When enabled with the default parameters, this option has
  1465. almost no overhead, as it reserves a relatively small amount
  1466. of memory and scans it infrequently. It both detects corruption
  1467. and prevents it from affecting the running system.
  1468. It is, however, intended as a diagnostic tool; if repeatable
  1469. BIOS-originated corruption always affects the same memory,
  1470. you can use memmap= to prevent the kernel from using that
  1471. memory.
  1472. config X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK
  1473. bool "Set the default setting of memory_corruption_check"
  1474. depends on X86_CHECK_BIOS_CORRUPTION
  1475. default y
  1476. help
  1477. Set whether the default state of memory_corruption_check is
  1478. on or off.
  1479. config MATH_EMULATION
  1480. bool
  1481. depends on MODIFY_LDT_SYSCALL
  1482. prompt "Math emulation" if X86_32 && (M486SX || MELAN)
  1483. help
  1484. Linux can emulate a math coprocessor (used for floating point
  1485. operations) if you don't have one. 486DX and Pentium processors have
  1486. a math coprocessor built in, 486SX and 386 do not, unless you added
  1487. a 487DX or 387, respectively. (The messages during boot time can
  1488. give you some hints here ["man dmesg"].) Everyone needs either a
  1489. coprocessor or this emulation.
  1490. If you don't have a math coprocessor, you need to say Y here; if you
  1491. say Y here even though you have a coprocessor, the coprocessor will
  1492. be used nevertheless. (This behavior can be changed with the kernel
  1493. command line option "no387", which comes handy if your coprocessor
  1494. is broken. Try "man bootparam" or see the documentation of your boot
  1495. loader (lilo or loadlin) about how to pass options to the kernel at
  1496. boot time.) This means that it is a good idea to say Y here if you
  1497. intend to use this kernel on different machines.
  1498. More information about the internals of the Linux math coprocessor
  1499. emulation can be found in <file:arch/x86/math-emu/README>.
  1500. If you are not sure, say Y; apart from resulting in a 66 KB bigger
  1501. kernel, it won't hurt.
  1502. config MTRR
  1503. def_bool y
  1504. prompt "MTRR (Memory Type Range Register) support" if EXPERT
  1505. help
  1506. On Intel P6 family processors (Pentium Pro, Pentium II and later)
  1507. the Memory Type Range Registers (MTRRs) may be used to control
  1508. processor access to memory ranges. This is most useful if you have
  1509. a video (VGA) card on a PCI or AGP bus. Enabling write-combining
  1510. allows bus write transfers to be combined into a larger transfer
  1511. before bursting over the PCI/AGP bus. This can increase performance
  1512. of image write operations 2.5 times or more. Saying Y here creates a
  1513. /proc/mtrr file which may be used to manipulate your processor's
  1514. MTRRs. Typically the X server should use this.
  1515. This code has a reasonably generic interface so that similar
  1516. control registers on other processors can be easily supported
  1517. as well:
  1518. The Cyrix 6x86, 6x86MX and M II processors have Address Range
  1519. Registers (ARRs) which provide a similar functionality to MTRRs. For
  1520. these, the ARRs are used to emulate the MTRRs.
  1521. The AMD K6-2 (stepping 8 and above) and K6-3 processors have two
  1522. MTRRs. The Centaur C6 (WinChip) has 8 MCRs, allowing
  1523. write-combining. All of these processors are supported by this code
  1524. and it makes sense to say Y here if you have one of them.
  1525. Saying Y here also fixes a problem with buggy SMP BIOSes which only
  1526. set the MTRRs for the boot CPU and not for the secondary CPUs. This
  1527. can lead to all sorts of problems, so it's good to say Y here.
  1528. You can safely say Y even if your machine doesn't have MTRRs, you'll
  1529. just add about 9 KB to your kernel.
  1530. See <file:Documentation/arch/x86/mtrr.rst> for more information.
  1531. config MTRR_SANITIZER
  1532. def_bool y
  1533. prompt "MTRR cleanup support"
  1534. depends on MTRR
  1535. help
  1536. Convert MTRR layout from continuous to discrete, so X drivers can
  1537. add writeback entries.
  1538. Can be disabled with disable_mtrr_cleanup on the kernel command line.
  1539. The largest mtrr entry size for a continuous block can be set with
  1540. mtrr_chunk_size.
  1541. If unsure, say Y.
  1542. config MTRR_SANITIZER_ENABLE_DEFAULT
  1543. int "MTRR cleanup enable value (0-1)"
  1544. range 0 1
  1545. default "0"
  1546. depends on MTRR_SANITIZER
  1547. help
  1548. Enable mtrr cleanup default value
  1549. config MTRR_SANITIZER_SPARE_REG_NR_DEFAULT
  1550. int "MTRR cleanup spare reg num (0-7)"
  1551. range 0 7
  1552. default "1"
  1553. depends on MTRR_SANITIZER
  1554. help
  1555. mtrr cleanup spare entries default, it can be changed via
  1556. mtrr_spare_reg_nr=N on the kernel command line.
  1557. config X86_PAT
  1558. def_bool y
  1559. prompt "x86 PAT support" if EXPERT
  1560. depends on MTRR
  1561. select ARCH_USES_PG_ARCH_2
  1562. help
  1563. Use PAT attributes to setup page level cache control.
  1564. PATs are the modern equivalents of MTRRs and are much more
  1565. flexible than MTRRs.
  1566. Say N here if you see bootup problems (boot crash, boot hang,
  1567. spontaneous reboots) or a non-working video driver.
  1568. If unsure, say Y.
  1569. config X86_UMIP
  1570. def_bool y
  1571. prompt "User Mode Instruction Prevention" if EXPERT
  1572. help
  1573. User Mode Instruction Prevention (UMIP) is a security feature in
  1574. some x86 processors. If enabled, a general protection fault is
  1575. issued if the SGDT, SLDT, SIDT, SMSW or STR instructions are
  1576. executed in user mode. These instructions unnecessarily expose
  1577. information about the hardware state.
  1578. The vast majority of applications do not use these instructions.
  1579. For the very few that do, software emulation is provided in
  1580. specific cases in protected and virtual-8086 modes. Emulated
  1581. results are dummy.
  1582. config CC_HAS_IBT
  1583. # GCC >= 9 and binutils >= 2.29
  1584. # Retpoline check to work around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93654
  1585. # Clang/LLVM >= 14
  1586. # https://github.com/llvm/llvm-project/commit/e0b89df2e0f0130881bf6c39bf31d7f6aac00e0f
  1587. # https://github.com/llvm/llvm-project/commit/dfcf69770bc522b9e411c66454934a37c1f35332
  1588. def_bool ((CC_IS_GCC && $(cc-option, -fcf-protection=branch -mindirect-branch-register)) || \
  1589. (CC_IS_CLANG && CLANG_VERSION >= 140000)) && \
  1590. $(as-instr,endbr64)
  1591. config X86_CET
  1592. def_bool n
  1593. help
  1594. CET features configured (Shadow stack or IBT)
  1595. config X86_KERNEL_IBT
  1596. prompt "Indirect Branch Tracking"
  1597. def_bool y
  1598. depends on X86_64 && CC_HAS_IBT && HAVE_OBJTOOL
  1599. # https://github.com/llvm/llvm-project/commit/9d7001eba9c4cb311e03cd8cdc231f9e579f2d0f
  1600. depends on !LD_IS_LLD || LLD_VERSION >= 140000
  1601. select OBJTOOL
  1602. select X86_CET
  1603. help
  1604. Build the kernel with support for Indirect Branch Tracking, a
  1605. hardware support course-grain forward-edge Control Flow Integrity
  1606. protection. It enforces that all indirect calls must land on
  1607. an ENDBR instruction, as such, the compiler will instrument the
  1608. code with them to make this happen.
  1609. In addition to building the kernel with IBT, seal all functions that
  1610. are not indirect call targets, avoiding them ever becoming one.
  1611. This requires LTO like objtool runs and will slow down the build. It
  1612. does significantly reduce the number of ENDBR instructions in the
  1613. kernel image.
  1614. config X86_INTEL_MEMORY_PROTECTION_KEYS
  1615. prompt "Memory Protection Keys"
  1616. def_bool y
  1617. # Note: only available in 64-bit mode
  1618. depends on X86_64 && (CPU_SUP_INTEL || CPU_SUP_AMD)
  1619. select ARCH_USES_HIGH_VMA_FLAGS
  1620. select ARCH_HAS_PKEYS
  1621. help
  1622. Memory Protection Keys provides a mechanism for enforcing
  1623. page-based protections, but without requiring modification of the
  1624. page tables when an application changes protection domains.
  1625. For details, see Documentation/core-api/protection-keys.rst
  1626. If unsure, say y.
  1627. config ARCH_PKEY_BITS
  1628. int
  1629. default 4
  1630. choice
  1631. prompt "TSX enable mode"
  1632. depends on CPU_SUP_INTEL
  1633. default X86_INTEL_TSX_MODE_OFF
  1634. help
  1635. Intel's TSX (Transactional Synchronization Extensions) feature
  1636. allows to optimize locking protocols through lock elision which
  1637. can lead to a noticeable performance boost.
  1638. On the other hand it has been shown that TSX can be exploited
  1639. to form side channel attacks (e.g. TAA) and chances are there
  1640. will be more of those attacks discovered in the future.
  1641. Therefore TSX is not enabled by default (aka tsx=off). An admin
  1642. might override this decision by tsx=on the command line parameter.
  1643. Even with TSX enabled, the kernel will attempt to enable the best
  1644. possible TAA mitigation setting depending on the microcode available
  1645. for the particular machine.
  1646. This option allows to set the default tsx mode between tsx=on, =off
  1647. and =auto. See Documentation/admin-guide/kernel-parameters.txt for more
  1648. details.
  1649. Say off if not sure, auto if TSX is in use but it should be used on safe
  1650. platforms or on if TSX is in use and the security aspect of tsx is not
  1651. relevant.
  1652. config X86_INTEL_TSX_MODE_OFF
  1653. bool "off"
  1654. help
  1655. TSX is disabled if possible - equals to tsx=off command line parameter.
  1656. config X86_INTEL_TSX_MODE_ON
  1657. bool "on"
  1658. help
  1659. TSX is always enabled on TSX capable HW - equals the tsx=on command
  1660. line parameter.
  1661. config X86_INTEL_TSX_MODE_AUTO
  1662. bool "auto"
  1663. help
  1664. TSX is enabled on TSX capable HW that is believed to be safe against
  1665. side channel attacks- equals the tsx=auto command line parameter.
  1666. endchoice
  1667. config X86_SGX
  1668. bool "Software Guard eXtensions (SGX)"
  1669. depends on X86_64 && CPU_SUP_INTEL && X86_X2APIC
  1670. depends on CRYPTO=y
  1671. depends on CRYPTO_SHA256=y
  1672. select MMU_NOTIFIER
  1673. select NUMA_KEEP_MEMINFO if NUMA
  1674. select XARRAY_MULTI
  1675. help
  1676. Intel(R) Software Guard eXtensions (SGX) is a set of CPU instructions
  1677. that can be used by applications to set aside private regions of code
  1678. and data, referred to as enclaves. An enclave's private memory can
  1679. only be accessed by code running within the enclave. Accesses from
  1680. outside the enclave, including other enclaves, are disallowed by
  1681. hardware.
  1682. If unsure, say N.
  1683. config X86_USER_SHADOW_STACK
  1684. bool "X86 userspace shadow stack"
  1685. depends on AS_WRUSS
  1686. depends on X86_64
  1687. select ARCH_USES_HIGH_VMA_FLAGS
  1688. select X86_CET
  1689. help
  1690. Shadow stack protection is a hardware feature that detects function
  1691. return address corruption. This helps mitigate ROP attacks.
  1692. Applications must be enabled to use it, and old userspace does not
  1693. get protection "for free".
  1694. CPUs supporting shadow stacks were first released in 2020.
  1695. See Documentation/arch/x86/shstk.rst for more information.
  1696. If unsure, say N.
  1697. config INTEL_TDX_HOST
  1698. bool "Intel Trust Domain Extensions (TDX) host support"
  1699. depends on CPU_SUP_INTEL
  1700. depends on X86_64
  1701. depends on KVM_INTEL
  1702. depends on X86_X2APIC
  1703. select ARCH_KEEP_MEMBLOCK
  1704. depends on CONTIG_ALLOC
  1705. depends on !KEXEC_CORE
  1706. depends on X86_MCE
  1707. help
  1708. Intel Trust Domain Extensions (TDX) protects guest VMs from malicious
  1709. host and certain physical attacks. This option enables necessary TDX
  1710. support in the host kernel to run confidential VMs.
  1711. If unsure, say N.
  1712. config EFI
  1713. bool "EFI runtime service support"
  1714. depends on ACPI
  1715. select UCS2_STRING
  1716. select EFI_RUNTIME_WRAPPERS
  1717. select ARCH_USE_MEMREMAP_PROT
  1718. select EFI_RUNTIME_MAP if KEXEC_CORE
  1719. help
  1720. This enables the kernel to use EFI runtime services that are
  1721. available (such as the EFI variable services).
  1722. This option is only useful on systems that have EFI firmware.
  1723. In addition, you should use the latest ELILO loader available
  1724. at <http://elilo.sourceforge.net> in order to take advantage
  1725. of EFI runtime services. However, even with this option, the
  1726. resultant kernel should continue to boot on existing non-EFI
  1727. platforms.
  1728. config EFI_STUB
  1729. bool "EFI stub support"
  1730. depends on EFI
  1731. select RELOCATABLE
  1732. help
  1733. This kernel feature allows a bzImage to be loaded directly
  1734. by EFI firmware without the use of a bootloader.
  1735. See Documentation/admin-guide/efi-stub.rst for more information.
  1736. config EFI_HANDOVER_PROTOCOL
  1737. bool "EFI handover protocol (DEPRECATED)"
  1738. depends on EFI_STUB
  1739. default y
  1740. help
  1741. Select this in order to include support for the deprecated EFI
  1742. handover protocol, which defines alternative entry points into the
  1743. EFI stub. This is a practice that has no basis in the UEFI
  1744. specification, and requires a priori knowledge on the part of the
  1745. bootloader about Linux/x86 specific ways of passing the command line
  1746. and initrd, and where in memory those assets may be loaded.
  1747. If in doubt, say Y. Even though the corresponding support is not
  1748. present in upstream GRUB or other bootloaders, most distros build
  1749. GRUB with numerous downstream patches applied, and may rely on the
  1750. handover protocol as as result.
  1751. config EFI_MIXED
  1752. bool "EFI mixed-mode support"
  1753. depends on EFI_STUB && X86_64
  1754. help
  1755. Enabling this feature allows a 64-bit kernel to be booted
  1756. on a 32-bit firmware, provided that your CPU supports 64-bit
  1757. mode.
  1758. Note that it is not possible to boot a mixed-mode enabled
  1759. kernel via the EFI boot stub - a bootloader that supports
  1760. the EFI handover protocol must be used.
  1761. If unsure, say N.
  1762. config EFI_RUNTIME_MAP
  1763. bool "Export EFI runtime maps to sysfs" if EXPERT
  1764. depends on EFI
  1765. help
  1766. Export EFI runtime memory regions to /sys/firmware/efi/runtime-map.
  1767. That memory map is required by the 2nd kernel to set up EFI virtual
  1768. mappings after kexec, but can also be used for debugging purposes.
  1769. See also Documentation/ABI/testing/sysfs-firmware-efi-runtime-map.
  1770. source "kernel/Kconfig.hz"
  1771. config ARCH_SUPPORTS_KEXEC
  1772. def_bool y
  1773. config ARCH_SUPPORTS_KEXEC_FILE
  1774. def_bool X86_64
  1775. config ARCH_SELECTS_KEXEC_FILE
  1776. def_bool y
  1777. depends on KEXEC_FILE
  1778. select HAVE_IMA_KEXEC if IMA
  1779. config ARCH_SUPPORTS_KEXEC_PURGATORY
  1780. def_bool y
  1781. config ARCH_SUPPORTS_KEXEC_SIG
  1782. def_bool y
  1783. config ARCH_SUPPORTS_KEXEC_SIG_FORCE
  1784. def_bool y
  1785. config ARCH_SUPPORTS_KEXEC_BZIMAGE_VERIFY_SIG
  1786. def_bool y
  1787. config ARCH_SUPPORTS_KEXEC_JUMP
  1788. def_bool y
  1789. config ARCH_SUPPORTS_CRASH_DUMP
  1790. def_bool X86_64 || (X86_32 && HIGHMEM)
  1791. config ARCH_DEFAULT_CRASH_DUMP
  1792. def_bool y
  1793. config ARCH_SUPPORTS_CRASH_HOTPLUG
  1794. def_bool y
  1795. config ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION
  1796. def_bool CRASH_RESERVE
  1797. config PHYSICAL_START
  1798. hex "Physical address where the kernel is loaded" if (EXPERT || CRASH_DUMP)
  1799. default "0x1000000"
  1800. help
  1801. This gives the physical address where the kernel is loaded.
  1802. If the kernel is not relocatable (CONFIG_RELOCATABLE=n) then bzImage
  1803. will decompress itself to above physical address and run from there.
  1804. Otherwise, bzImage will run from the address where it has been loaded
  1805. by the boot loader. The only exception is if it is loaded below the
  1806. above physical address, in which case it will relocate itself there.
  1807. In normal kdump cases one does not have to set/change this option
  1808. as now bzImage can be compiled as a completely relocatable image
  1809. (CONFIG_RELOCATABLE=y) and be used to load and run from a different
  1810. address. This option is mainly useful for the folks who don't want
  1811. to use a bzImage for capturing the crash dump and want to use a
  1812. vmlinux instead. vmlinux is not relocatable hence a kernel needs
  1813. to be specifically compiled to run from a specific memory area
  1814. (normally a reserved region) and this option comes handy.
  1815. So if you are using bzImage for capturing the crash dump,
  1816. leave the value here unchanged to 0x1000000 and set
  1817. CONFIG_RELOCATABLE=y. Otherwise if you plan to use vmlinux
  1818. for capturing the crash dump change this value to start of
  1819. the reserved region. In other words, it can be set based on
  1820. the "X" value as specified in the "crashkernel=YM@XM"
  1821. command line boot parameter passed to the panic-ed
  1822. kernel. Please take a look at Documentation/admin-guide/kdump/kdump.rst
  1823. for more details about crash dumps.
  1824. Usage of bzImage for capturing the crash dump is recommended as
  1825. one does not have to build two kernels. Same kernel can be used
  1826. as production kernel and capture kernel. Above option should have
  1827. gone away after relocatable bzImage support is introduced. But it
  1828. is present because there are users out there who continue to use
  1829. vmlinux for dump capture. This option should go away down the
  1830. line.
  1831. Don't change this unless you know what you are doing.
  1832. config RELOCATABLE
  1833. bool "Build a relocatable kernel"
  1834. default y
  1835. help
  1836. This builds a kernel image that retains relocation information
  1837. so it can be loaded someplace besides the default 1MB.
  1838. The relocations tend to make the kernel binary about 10% larger,
  1839. but are discarded at runtime.
  1840. One use is for the kexec on panic case where the recovery kernel
  1841. must live at a different physical address than the primary
  1842. kernel.
  1843. Note: If CONFIG_RELOCATABLE=y, then the kernel runs from the address
  1844. it has been loaded at and the compile time physical address
  1845. (CONFIG_PHYSICAL_START) is used as the minimum location.
  1846. config RANDOMIZE_BASE
  1847. bool "Randomize the address of the kernel image (KASLR)"
  1848. depends on RELOCATABLE
  1849. default y
  1850. help
  1851. In support of Kernel Address Space Layout Randomization (KASLR),
  1852. this randomizes the physical address at which the kernel image
  1853. is decompressed and the virtual address where the kernel
  1854. image is mapped, as a security feature that deters exploit
  1855. attempts relying on knowledge of the location of kernel
  1856. code internals.
  1857. On 64-bit, the kernel physical and virtual addresses are
  1858. randomized separately. The physical address will be anywhere
  1859. between 16MB and the top of physical memory (up to 64TB). The
  1860. virtual address will be randomized from 16MB up to 1GB (9 bits
  1861. of entropy). Note that this also reduces the memory space
  1862. available to kernel modules from 1.5GB to 1GB.
  1863. On 32-bit, the kernel physical and virtual addresses are
  1864. randomized together. They will be randomized from 16MB up to
  1865. 512MB (8 bits of entropy).
  1866. Entropy is generated using the RDRAND instruction if it is
  1867. supported. If RDTSC is supported, its value is mixed into
  1868. the entropy pool as well. If neither RDRAND nor RDTSC are
  1869. supported, then entropy is read from the i8254 timer. The
  1870. usable entropy is limited by the kernel being built using
  1871. 2GB addressing, and that PHYSICAL_ALIGN must be at a
  1872. minimum of 2MB. As a result, only 10 bits of entropy are
  1873. theoretically possible, but the implementations are further
  1874. limited due to memory layouts.
  1875. If unsure, say Y.
  1876. # Relocation on x86 needs some additional build support
  1877. config X86_NEED_RELOCS
  1878. def_bool y
  1879. depends on RANDOMIZE_BASE || (X86_32 && RELOCATABLE)
  1880. config PHYSICAL_ALIGN
  1881. hex "Alignment value to which kernel should be aligned"
  1882. default "0x200000"
  1883. range 0x2000 0x1000000 if X86_32
  1884. range 0x200000 0x1000000 if X86_64
  1885. help
  1886. This value puts the alignment restrictions on physical address
  1887. where kernel is loaded and run from. Kernel is compiled for an
  1888. address which meets above alignment restriction.
  1889. If bootloader loads the kernel at a non-aligned address and
  1890. CONFIG_RELOCATABLE is set, kernel will move itself to nearest
  1891. address aligned to above value and run from there.
  1892. If bootloader loads the kernel at a non-aligned address and
  1893. CONFIG_RELOCATABLE is not set, kernel will ignore the run time
  1894. load address and decompress itself to the address it has been
  1895. compiled for and run from there. The address for which kernel is
  1896. compiled already meets above alignment restrictions. Hence the
  1897. end result is that kernel runs from a physical address meeting
  1898. above alignment restrictions.
  1899. On 32-bit this value must be a multiple of 0x2000. On 64-bit
  1900. this value must be a multiple of 0x200000.
  1901. Don't change this unless you know what you are doing.
  1902. config DYNAMIC_MEMORY_LAYOUT
  1903. bool
  1904. help
  1905. This option makes base addresses of vmalloc and vmemmap as well as
  1906. __PAGE_OFFSET movable during boot.
  1907. config RANDOMIZE_MEMORY
  1908. bool "Randomize the kernel memory sections"
  1909. depends on X86_64
  1910. depends on RANDOMIZE_BASE
  1911. select DYNAMIC_MEMORY_LAYOUT
  1912. default RANDOMIZE_BASE
  1913. help
  1914. Randomizes the base virtual address of kernel memory sections
  1915. (physical memory mapping, vmalloc & vmemmap). This security feature
  1916. makes exploits relying on predictable memory locations less reliable.
  1917. The order of allocations remains unchanged. Entropy is generated in
  1918. the same way as RANDOMIZE_BASE. Current implementation in the optimal
  1919. configuration have in average 30,000 different possible virtual
  1920. addresses for each memory section.
  1921. If unsure, say Y.
  1922. config RANDOMIZE_MEMORY_PHYSICAL_PADDING
  1923. hex "Physical memory mapping padding" if EXPERT
  1924. depends on RANDOMIZE_MEMORY
  1925. default "0xa" if MEMORY_HOTPLUG
  1926. default "0x0"
  1927. range 0x1 0x40 if MEMORY_HOTPLUG
  1928. range 0x0 0x40
  1929. help
  1930. Define the padding in terabytes added to the existing physical
  1931. memory size during kernel memory randomization. It is useful
  1932. for memory hotplug support but reduces the entropy available for
  1933. address randomization.
  1934. If unsure, leave at the default value.
  1935. config ADDRESS_MASKING
  1936. bool "Linear Address Masking support"
  1937. depends on X86_64
  1938. depends on COMPILE_TEST || !CPU_MITIGATIONS # wait for LASS
  1939. help
  1940. Linear Address Masking (LAM) modifies the checking that is applied
  1941. to 64-bit linear addresses, allowing software to use of the
  1942. untranslated address bits for metadata.
  1943. The capability can be used for efficient address sanitizers (ASAN)
  1944. implementation and for optimizations in JITs.
  1945. config HOTPLUG_CPU
  1946. def_bool y
  1947. depends on SMP
  1948. config COMPAT_VDSO
  1949. def_bool n
  1950. prompt "Disable the 32-bit vDSO (needed for glibc 2.3.3)"
  1951. depends on COMPAT_32
  1952. help
  1953. Certain buggy versions of glibc will crash if they are
  1954. presented with a 32-bit vDSO that is not mapped at the address
  1955. indicated in its segment table.
  1956. The bug was introduced by f866314b89d56845f55e6f365e18b31ec978ec3a
  1957. and fixed by 3b3ddb4f7db98ec9e912ccdf54d35df4aa30e04a and
  1958. 49ad572a70b8aeb91e57483a11dd1b77e31c4468. Glibc 2.3.3 is
  1959. the only released version with the bug, but OpenSUSE 9
  1960. contains a buggy "glibc 2.3.2".
  1961. The symptom of the bug is that everything crashes on startup, saying:
  1962. dl_main: Assertion `(void *) ph->p_vaddr == _rtld_local._dl_sysinfo_dso' failed!
  1963. Saying Y here changes the default value of the vdso32 boot
  1964. option from 1 to 0, which turns off the 32-bit vDSO entirely.
  1965. This works around the glibc bug but hurts performance.
  1966. If unsure, say N: if you are compiling your own kernel, you
  1967. are unlikely to be using a buggy version of glibc.
  1968. choice
  1969. prompt "vsyscall table for legacy applications"
  1970. depends on X86_64
  1971. default LEGACY_VSYSCALL_XONLY
  1972. help
  1973. Legacy user code that does not know how to find the vDSO expects
  1974. to be able to issue three syscalls by calling fixed addresses in
  1975. kernel space. Since this location is not randomized with ASLR,
  1976. it can be used to assist security vulnerability exploitation.
  1977. This setting can be changed at boot time via the kernel command
  1978. line parameter vsyscall=[emulate|xonly|none]. Emulate mode
  1979. is deprecated and can only be enabled using the kernel command
  1980. line.
  1981. On a system with recent enough glibc (2.14 or newer) and no
  1982. static binaries, you can say None without a performance penalty
  1983. to improve security.
  1984. If unsure, select "Emulate execution only".
  1985. config LEGACY_VSYSCALL_XONLY
  1986. bool "Emulate execution only"
  1987. help
  1988. The kernel traps and emulates calls into the fixed vsyscall
  1989. address mapping and does not allow reads. This
  1990. configuration is recommended when userspace might use the
  1991. legacy vsyscall area but support for legacy binary
  1992. instrumentation of legacy code is not needed. It mitigates
  1993. certain uses of the vsyscall area as an ASLR-bypassing
  1994. buffer.
  1995. config LEGACY_VSYSCALL_NONE
  1996. bool "None"
  1997. help
  1998. There will be no vsyscall mapping at all. This will
  1999. eliminate any risk of ASLR bypass due to the vsyscall
  2000. fixed address mapping. Attempts to use the vsyscalls
  2001. will be reported to dmesg, so that either old or
  2002. malicious userspace programs can be identified.
  2003. endchoice
  2004. config CMDLINE_BOOL
  2005. bool "Built-in kernel command line"
  2006. help
  2007. Allow for specifying boot arguments to the kernel at
  2008. build time. On some systems (e.g. embedded ones), it is
  2009. necessary or convenient to provide some or all of the
  2010. kernel boot arguments with the kernel itself (that is,
  2011. to not rely on the boot loader to provide them.)
  2012. To compile command line arguments into the kernel,
  2013. set this option to 'Y', then fill in the
  2014. boot arguments in CONFIG_CMDLINE.
  2015. Systems with fully functional boot loaders (i.e. non-embedded)
  2016. should leave this option set to 'N'.
  2017. config CMDLINE
  2018. string "Built-in kernel command string"
  2019. depends on CMDLINE_BOOL
  2020. default ""
  2021. help
  2022. Enter arguments here that should be compiled into the kernel
  2023. image and used at boot time. If the boot loader provides a
  2024. command line at boot time, it is appended to this string to
  2025. form the full kernel command line, when the system boots.
  2026. However, you can use the CONFIG_CMDLINE_OVERRIDE option to
  2027. change this behavior.
  2028. In most cases, the command line (whether built-in or provided
  2029. by the boot loader) should specify the device for the root
  2030. file system.
  2031. config CMDLINE_OVERRIDE
  2032. bool "Built-in command line overrides boot loader arguments"
  2033. depends on CMDLINE_BOOL && CMDLINE != ""
  2034. help
  2035. Set this option to 'Y' to have the kernel ignore the boot loader
  2036. command line, and use ONLY the built-in command line.
  2037. This is used to work around broken boot loaders. This should
  2038. be set to 'N' under normal conditions.
  2039. config MODIFY_LDT_SYSCALL
  2040. bool "Enable the LDT (local descriptor table)" if EXPERT
  2041. default y
  2042. help
  2043. Linux can allow user programs to install a per-process x86
  2044. Local Descriptor Table (LDT) using the modify_ldt(2) system
  2045. call. This is required to run 16-bit or segmented code such as
  2046. DOSEMU or some Wine programs. It is also used by some very old
  2047. threading libraries.
  2048. Enabling this feature adds a small amount of overhead to
  2049. context switches and increases the low-level kernel attack
  2050. surface. Disabling it removes the modify_ldt(2) system call.
  2051. Saying 'N' here may make sense for embedded or server kernels.
  2052. config STRICT_SIGALTSTACK_SIZE
  2053. bool "Enforce strict size checking for sigaltstack"
  2054. depends on DYNAMIC_SIGFRAME
  2055. help
  2056. For historical reasons MINSIGSTKSZ is a constant which became
  2057. already too small with AVX512 support. Add a mechanism to
  2058. enforce strict checking of the sigaltstack size against the
  2059. real size of the FPU frame. This option enables the check
  2060. by default. It can also be controlled via the kernel command
  2061. line option 'strict_sas_size' independent of this config
  2062. switch. Enabling it might break existing applications which
  2063. allocate a too small sigaltstack but 'work' because they
  2064. never get a signal delivered.
  2065. Say 'N' unless you want to really enforce this check.
  2066. config CFI_AUTO_DEFAULT
  2067. bool "Attempt to use FineIBT by default at boot time"
  2068. depends on FINEIBT
  2069. default y
  2070. help
  2071. Attempt to use FineIBT by default at boot time. If enabled,
  2072. this is the same as booting with "cfi=auto". If disabled,
  2073. this is the same as booting with "cfi=kcfi".
  2074. source "kernel/livepatch/Kconfig"
  2075. endmenu
  2076. config CC_HAS_NAMED_AS
  2077. def_bool $(success,echo 'int __seg_fs fs; int __seg_gs gs;' | $(CC) -x c - -S -o /dev/null)
  2078. depends on CC_IS_GCC
  2079. config CC_HAS_NAMED_AS_FIXED_SANITIZERS
  2080. def_bool CC_IS_GCC && GCC_VERSION >= 130300
  2081. config USE_X86_SEG_SUPPORT
  2082. def_bool y
  2083. depends on CC_HAS_NAMED_AS
  2084. #
  2085. # -fsanitize=kernel-address (KASAN) and -fsanitize=thread
  2086. # (KCSAN) are incompatible with named address spaces with
  2087. # GCC < 13.3 - see GCC PR sanitizer/111736.
  2088. #
  2089. depends on !(KASAN || KCSAN) || CC_HAS_NAMED_AS_FIXED_SANITIZERS
  2090. config CC_HAS_SLS
  2091. def_bool $(cc-option,-mharden-sls=all)
  2092. config CC_HAS_RETURN_THUNK
  2093. def_bool $(cc-option,-mfunction-return=thunk-extern)
  2094. config CC_HAS_ENTRY_PADDING
  2095. def_bool $(cc-option,-fpatchable-function-entry=16,16)
  2096. config FUNCTION_PADDING_CFI
  2097. int
  2098. default 59 if FUNCTION_ALIGNMENT_64B
  2099. default 27 if FUNCTION_ALIGNMENT_32B
  2100. default 11 if FUNCTION_ALIGNMENT_16B
  2101. default 3 if FUNCTION_ALIGNMENT_8B
  2102. default 0
  2103. # Basically: FUNCTION_ALIGNMENT - 5*CFI_CLANG
  2104. # except Kconfig can't do arithmetic :/
  2105. config FUNCTION_PADDING_BYTES
  2106. int
  2107. default FUNCTION_PADDING_CFI if CFI_CLANG
  2108. default FUNCTION_ALIGNMENT
  2109. config CALL_PADDING
  2110. def_bool n
  2111. depends on CC_HAS_ENTRY_PADDING && OBJTOOL
  2112. select FUNCTION_ALIGNMENT_16B
  2113. config FINEIBT
  2114. def_bool y
  2115. depends on X86_KERNEL_IBT && CFI_CLANG && MITIGATION_RETPOLINE
  2116. select CALL_PADDING
  2117. config HAVE_CALL_THUNKS
  2118. def_bool y
  2119. depends on CC_HAS_ENTRY_PADDING && MITIGATION_RETHUNK && OBJTOOL
  2120. config CALL_THUNKS
  2121. def_bool n
  2122. select CALL_PADDING
  2123. config PREFIX_SYMBOLS
  2124. def_bool y
  2125. depends on CALL_PADDING && !CFI_CLANG
  2126. menuconfig CPU_MITIGATIONS
  2127. bool "Mitigations for CPU vulnerabilities"
  2128. default y
  2129. help
  2130. Say Y here to enable options which enable mitigations for hardware
  2131. vulnerabilities (usually related to speculative execution).
  2132. Mitigations can be disabled or restricted to SMT systems at runtime
  2133. via the "mitigations" kernel parameter.
  2134. If you say N, all mitigations will be disabled. This CANNOT be
  2135. overridden at runtime.
  2136. Say 'Y', unless you really know what you are doing.
  2137. if CPU_MITIGATIONS
  2138. config MITIGATION_PAGE_TABLE_ISOLATION
  2139. bool "Remove the kernel mapping in user mode"
  2140. default y
  2141. depends on (X86_64 || X86_PAE)
  2142. help
  2143. This feature reduces the number of hardware side channels by
  2144. ensuring that the majority of kernel addresses are not mapped
  2145. into userspace.
  2146. See Documentation/arch/x86/pti.rst for more details.
  2147. config MITIGATION_RETPOLINE
  2148. bool "Avoid speculative indirect branches in kernel"
  2149. select OBJTOOL if HAVE_OBJTOOL
  2150. default y
  2151. help
  2152. Compile kernel with the retpoline compiler options to guard against
  2153. kernel-to-user data leaks by avoiding speculative indirect
  2154. branches. Requires a compiler with -mindirect-branch=thunk-extern
  2155. support for full protection. The kernel may run slower.
  2156. config MITIGATION_RETHUNK
  2157. bool "Enable return-thunks"
  2158. depends on MITIGATION_RETPOLINE && CC_HAS_RETURN_THUNK
  2159. select OBJTOOL if HAVE_OBJTOOL
  2160. default y if X86_64
  2161. help
  2162. Compile the kernel with the return-thunks compiler option to guard
  2163. against kernel-to-user data leaks by avoiding return speculation.
  2164. Requires a compiler with -mfunction-return=thunk-extern
  2165. support for full protection. The kernel may run slower.
  2166. config MITIGATION_UNRET_ENTRY
  2167. bool "Enable UNRET on kernel entry"
  2168. depends on CPU_SUP_AMD && MITIGATION_RETHUNK && X86_64
  2169. default y
  2170. help
  2171. Compile the kernel with support for the retbleed=unret mitigation.
  2172. config MITIGATION_CALL_DEPTH_TRACKING
  2173. bool "Mitigate RSB underflow with call depth tracking"
  2174. depends on CPU_SUP_INTEL && HAVE_CALL_THUNKS
  2175. select HAVE_DYNAMIC_FTRACE_NO_PATCHABLE
  2176. select CALL_THUNKS
  2177. default y
  2178. help
  2179. Compile the kernel with call depth tracking to mitigate the Intel
  2180. SKL Return-Speculation-Buffer (RSB) underflow issue. The
  2181. mitigation is off by default and needs to be enabled on the
  2182. kernel command line via the retbleed=stuff option. For
  2183. non-affected systems the overhead of this option is marginal as
  2184. the call depth tracking is using run-time generated call thunks
  2185. in a compiler generated padding area and call patching. This
  2186. increases text size by ~5%. For non affected systems this space
  2187. is unused. On affected SKL systems this results in a significant
  2188. performance gain over the IBRS mitigation.
  2189. config CALL_THUNKS_DEBUG
  2190. bool "Enable call thunks and call depth tracking debugging"
  2191. depends on MITIGATION_CALL_DEPTH_TRACKING
  2192. select FUNCTION_ALIGNMENT_32B
  2193. default n
  2194. help
  2195. Enable call/ret counters for imbalance detection and build in
  2196. a noisy dmesg about callthunks generation and call patching for
  2197. trouble shooting. The debug prints need to be enabled on the
  2198. kernel command line with 'debug-callthunks'.
  2199. Only enable this when you are debugging call thunks as this
  2200. creates a noticeable runtime overhead. If unsure say N.
  2201. config MITIGATION_IBPB_ENTRY
  2202. bool "Enable IBPB on kernel entry"
  2203. depends on CPU_SUP_AMD && X86_64
  2204. default y
  2205. help
  2206. Compile the kernel with support for the retbleed=ibpb and
  2207. spec_rstack_overflow={ibpb,ibpb-vmexit} mitigations.
  2208. config MITIGATION_IBRS_ENTRY
  2209. bool "Enable IBRS on kernel entry"
  2210. depends on CPU_SUP_INTEL && X86_64
  2211. default y
  2212. help
  2213. Compile the kernel with support for the spectre_v2=ibrs mitigation.
  2214. This mitigates both spectre_v2 and retbleed at great cost to
  2215. performance.
  2216. config MITIGATION_SRSO
  2217. bool "Mitigate speculative RAS overflow on AMD"
  2218. depends on CPU_SUP_AMD && X86_64 && MITIGATION_RETHUNK
  2219. default y
  2220. help
  2221. Enable the SRSO mitigation needed on AMD Zen1-4 machines.
  2222. config MITIGATION_SLS
  2223. bool "Mitigate Straight-Line-Speculation"
  2224. depends on CC_HAS_SLS && X86_64
  2225. select OBJTOOL if HAVE_OBJTOOL
  2226. default n
  2227. help
  2228. Compile the kernel with straight-line-speculation options to guard
  2229. against straight line speculation. The kernel image might be slightly
  2230. larger.
  2231. config MITIGATION_GDS
  2232. bool "Mitigate Gather Data Sampling"
  2233. depends on CPU_SUP_INTEL
  2234. default y
  2235. help
  2236. Enable mitigation for Gather Data Sampling (GDS). GDS is a hardware
  2237. vulnerability which allows unprivileged speculative access to data
  2238. which was previously stored in vector registers. The attacker uses gather
  2239. instructions to infer the stale vector register data.
  2240. config MITIGATION_RFDS
  2241. bool "RFDS Mitigation"
  2242. depends on CPU_SUP_INTEL
  2243. default y
  2244. help
  2245. Enable mitigation for Register File Data Sampling (RFDS) by default.
  2246. RFDS is a hardware vulnerability which affects Intel Atom CPUs. It
  2247. allows unprivileged speculative access to stale data previously
  2248. stored in floating point, vector and integer registers.
  2249. See also <file:Documentation/admin-guide/hw-vuln/reg-file-data-sampling.rst>
  2250. config MITIGATION_SPECTRE_BHI
  2251. bool "Mitigate Spectre-BHB (Branch History Injection)"
  2252. depends on CPU_SUP_INTEL
  2253. default y
  2254. help
  2255. Enable BHI mitigations. BHI attacks are a form of Spectre V2 attacks
  2256. where the branch history buffer is poisoned to speculatively steer
  2257. indirect branches.
  2258. See <file:Documentation/admin-guide/hw-vuln/spectre.rst>
  2259. config MITIGATION_MDS
  2260. bool "Mitigate Microarchitectural Data Sampling (MDS) hardware bug"
  2261. depends on CPU_SUP_INTEL
  2262. default y
  2263. help
  2264. Enable mitigation for Microarchitectural Data Sampling (MDS). MDS is
  2265. a hardware vulnerability which allows unprivileged speculative access
  2266. to data which is available in various CPU internal buffers.
  2267. See also <file:Documentation/admin-guide/hw-vuln/mds.rst>
  2268. config MITIGATION_TAA
  2269. bool "Mitigate TSX Asynchronous Abort (TAA) hardware bug"
  2270. depends on CPU_SUP_INTEL
  2271. default y
  2272. help
  2273. Enable mitigation for TSX Asynchronous Abort (TAA). TAA is a hardware
  2274. vulnerability that allows unprivileged speculative access to data
  2275. which is available in various CPU internal buffers by using
  2276. asynchronous aborts within an Intel TSX transactional region.
  2277. See also <file:Documentation/admin-guide/hw-vuln/tsx_async_abort.rst>
  2278. config MITIGATION_MMIO_STALE_DATA
  2279. bool "Mitigate MMIO Stale Data hardware bug"
  2280. depends on CPU_SUP_INTEL
  2281. default y
  2282. help
  2283. Enable mitigation for MMIO Stale Data hardware bugs. Processor MMIO
  2284. Stale Data Vulnerabilities are a class of memory-mapped I/O (MMIO)
  2285. vulnerabilities that can expose data. The vulnerabilities require the
  2286. attacker to have access to MMIO.
  2287. See also
  2288. <file:Documentation/admin-guide/hw-vuln/processor_mmio_stale_data.rst>
  2289. config MITIGATION_L1TF
  2290. bool "Mitigate L1 Terminal Fault (L1TF) hardware bug"
  2291. depends on CPU_SUP_INTEL
  2292. default y
  2293. help
  2294. Mitigate L1 Terminal Fault (L1TF) hardware bug. L1 Terminal Fault is a
  2295. hardware vulnerability which allows unprivileged speculative access to data
  2296. available in the Level 1 Data Cache.
  2297. See <file:Documentation/admin-guide/hw-vuln/l1tf.rst
  2298. config MITIGATION_RETBLEED
  2299. bool "Mitigate RETBleed hardware bug"
  2300. depends on (CPU_SUP_INTEL && MITIGATION_SPECTRE_V2) || MITIGATION_UNRET_ENTRY || MITIGATION_IBPB_ENTRY
  2301. default y
  2302. help
  2303. Enable mitigation for RETBleed (Arbitrary Speculative Code Execution
  2304. with Return Instructions) vulnerability. RETBleed is a speculative
  2305. execution attack which takes advantage of microarchitectural behavior
  2306. in many modern microprocessors, similar to Spectre v2. An
  2307. unprivileged attacker can use these flaws to bypass conventional
  2308. memory security restrictions to gain read access to privileged memory
  2309. that would otherwise be inaccessible.
  2310. config MITIGATION_SPECTRE_V1
  2311. bool "Mitigate SPECTRE V1 hardware bug"
  2312. default y
  2313. help
  2314. Enable mitigation for Spectre V1 (Bounds Check Bypass). Spectre V1 is a
  2315. class of side channel attacks that takes advantage of speculative
  2316. execution that bypasses conditional branch instructions used for
  2317. memory access bounds check.
  2318. See also <file:Documentation/admin-guide/hw-vuln/spectre.rst>
  2319. config MITIGATION_SPECTRE_V2
  2320. bool "Mitigate SPECTRE V2 hardware bug"
  2321. default y
  2322. help
  2323. Enable mitigation for Spectre V2 (Branch Target Injection). Spectre
  2324. V2 is a class of side channel attacks that takes advantage of
  2325. indirect branch predictors inside the processor. In Spectre variant 2
  2326. attacks, the attacker can steer speculative indirect branches in the
  2327. victim to gadget code by poisoning the branch target buffer of a CPU
  2328. used for predicting indirect branch addresses.
  2329. See also <file:Documentation/admin-guide/hw-vuln/spectre.rst>
  2330. config MITIGATION_SRBDS
  2331. bool "Mitigate Special Register Buffer Data Sampling (SRBDS) hardware bug"
  2332. depends on CPU_SUP_INTEL
  2333. default y
  2334. help
  2335. Enable mitigation for Special Register Buffer Data Sampling (SRBDS).
  2336. SRBDS is a hardware vulnerability that allows Microarchitectural Data
  2337. Sampling (MDS) techniques to infer values returned from special
  2338. register accesses. An unprivileged user can extract values returned
  2339. from RDRAND and RDSEED executed on another core or sibling thread
  2340. using MDS techniques.
  2341. See also
  2342. <file:Documentation/admin-guide/hw-vuln/special-register-buffer-data-sampling.rst>
  2343. config MITIGATION_SSB
  2344. bool "Mitigate Speculative Store Bypass (SSB) hardware bug"
  2345. default y
  2346. help
  2347. Enable mitigation for Speculative Store Bypass (SSB). SSB is a
  2348. hardware security vulnerability and its exploitation takes advantage
  2349. of speculative execution in a similar way to the Meltdown and Spectre
  2350. security vulnerabilities.
  2351. endif
  2352. config ARCH_HAS_ADD_PAGES
  2353. def_bool y
  2354. depends on ARCH_ENABLE_MEMORY_HOTPLUG
  2355. menu "Power management and ACPI options"
  2356. config ARCH_HIBERNATION_HEADER
  2357. def_bool y
  2358. depends on HIBERNATION
  2359. source "kernel/power/Kconfig"
  2360. source "drivers/acpi/Kconfig"
  2361. config X86_APM_BOOT
  2362. def_bool y
  2363. depends on APM
  2364. menuconfig APM
  2365. tristate "APM (Advanced Power Management) BIOS support"
  2366. depends on X86_32 && PM_SLEEP
  2367. help
  2368. APM is a BIOS specification for saving power using several different
  2369. techniques. This is mostly useful for battery powered laptops with
  2370. APM compliant BIOSes. If you say Y here, the system time will be
  2371. reset after a RESUME operation, the /proc/apm device will provide
  2372. battery status information, and user-space programs will receive
  2373. notification of APM "events" (e.g. battery status change).
  2374. If you select "Y" here, you can disable actual use of the APM
  2375. BIOS by passing the "apm=off" option to the kernel at boot time.
  2376. Note that the APM support is almost completely disabled for
  2377. machines with more than one CPU.
  2378. In order to use APM, you will need supporting software. For location
  2379. and more information, read <file:Documentation/power/apm-acpi.rst>
  2380. and the Battery Powered Linux mini-HOWTO, available from
  2381. <http://www.tldp.org/docs.html#howto>.
  2382. This driver does not spin down disk drives (see the hdparm(8)
  2383. manpage ("man 8 hdparm") for that), and it doesn't turn off
  2384. VESA-compliant "green" monitors.
  2385. This driver does not support the TI 4000M TravelMate and the ACER
  2386. 486/DX4/75 because they don't have compliant BIOSes. Many "green"
  2387. desktop machines also don't have compliant BIOSes, and this driver
  2388. may cause those machines to panic during the boot phase.
  2389. Generally, if you don't have a battery in your machine, there isn't
  2390. much point in using this driver and you should say N. If you get
  2391. random kernel OOPSes or reboots that don't seem to be related to
  2392. anything, try disabling/enabling this option (or disabling/enabling
  2393. APM in your BIOS).
  2394. Some other things you should try when experiencing seemingly random,
  2395. "weird" problems:
  2396. 1) make sure that you have enough swap space and that it is
  2397. enabled.
  2398. 2) pass the "idle=poll" option to the kernel
  2399. 3) switch on floating point emulation in the kernel and pass
  2400. the "no387" option to the kernel
  2401. 4) pass the "floppy=nodma" option to the kernel
  2402. 5) pass the "mem=4M" option to the kernel (thereby disabling
  2403. all but the first 4 MB of RAM)
  2404. 6) make sure that the CPU is not over clocked.
  2405. 7) read the sig11 FAQ at <http://www.bitwizard.nl/sig11/>
  2406. 8) disable the cache from your BIOS settings
  2407. 9) install a fan for the video card or exchange video RAM
  2408. 10) install a better fan for the CPU
  2409. 11) exchange RAM chips
  2410. 12) exchange the motherboard.
  2411. To compile this driver as a module, choose M here: the
  2412. module will be called apm.
  2413. if APM
  2414. config APM_IGNORE_USER_SUSPEND
  2415. bool "Ignore USER SUSPEND"
  2416. help
  2417. This option will ignore USER SUSPEND requests. On machines with a
  2418. compliant APM BIOS, you want to say N. However, on the NEC Versa M
  2419. series notebooks, it is necessary to say Y because of a BIOS bug.
  2420. config APM_DO_ENABLE
  2421. bool "Enable PM at boot time"
  2422. help
  2423. Enable APM features at boot time. From page 36 of the APM BIOS
  2424. specification: "When disabled, the APM BIOS does not automatically
  2425. power manage devices, enter the Standby State, enter the Suspend
  2426. State, or take power saving steps in response to CPU Idle calls."
  2427. This driver will make CPU Idle calls when Linux is idle (unless this
  2428. feature is turned off -- see "Do CPU IDLE calls", below). This
  2429. should always save battery power, but more complicated APM features
  2430. will be dependent on your BIOS implementation. You may need to turn
  2431. this option off if your computer hangs at boot time when using APM
  2432. support, or if it beeps continuously instead of suspending. Turn
  2433. this off if you have a NEC UltraLite Versa 33/C or a Toshiba
  2434. T400CDT. This is off by default since most machines do fine without
  2435. this feature.
  2436. config APM_CPU_IDLE
  2437. depends on CPU_IDLE
  2438. bool "Make CPU Idle calls when idle"
  2439. help
  2440. Enable calls to APM CPU Idle/CPU Busy inside the kernel's idle loop.
  2441. On some machines, this can activate improved power savings, such as
  2442. a slowed CPU clock rate, when the machine is idle. These idle calls
  2443. are made after the idle loop has run for some length of time (e.g.,
  2444. 333 mS). On some machines, this will cause a hang at boot time or
  2445. whenever the CPU becomes idle. (On machines with more than one CPU,
  2446. this option does nothing.)
  2447. config APM_DISPLAY_BLANK
  2448. bool "Enable console blanking using APM"
  2449. help
  2450. Enable console blanking using the APM. Some laptops can use this to
  2451. turn off the LCD backlight when the screen blanker of the Linux
  2452. virtual console blanks the screen. Note that this is only used by
  2453. the virtual console screen blanker, and won't turn off the backlight
  2454. when using the X Window system. This also doesn't have anything to
  2455. do with your VESA-compliant power-saving monitor. Further, this
  2456. option doesn't work for all laptops -- it might not turn off your
  2457. backlight at all, or it might print a lot of errors to the console,
  2458. especially if you are using gpm.
  2459. config APM_ALLOW_INTS
  2460. bool "Allow interrupts during APM BIOS calls"
  2461. help
  2462. Normally we disable external interrupts while we are making calls to
  2463. the APM BIOS as a measure to lessen the effects of a badly behaving
  2464. BIOS implementation. The BIOS should reenable interrupts if it
  2465. needs to. Unfortunately, some BIOSes do not -- especially those in
  2466. many of the newer IBM Thinkpads. If you experience hangs when you
  2467. suspend, try setting this to Y. Otherwise, say N.
  2468. endif # APM
  2469. source "drivers/cpufreq/Kconfig"
  2470. source "drivers/cpuidle/Kconfig"
  2471. source "drivers/idle/Kconfig"
  2472. endmenu
  2473. menu "Bus options (PCI etc.)"
  2474. choice
  2475. prompt "PCI access mode"
  2476. depends on X86_32 && PCI
  2477. default PCI_GOANY
  2478. help
  2479. On PCI systems, the BIOS can be used to detect the PCI devices and
  2480. determine their configuration. However, some old PCI motherboards
  2481. have BIOS bugs and may crash if this is done. Also, some embedded
  2482. PCI-based systems don't have any BIOS at all. Linux can also try to
  2483. detect the PCI hardware directly without using the BIOS.
  2484. With this option, you can specify how Linux should detect the
  2485. PCI devices. If you choose "BIOS", the BIOS will be used,
  2486. if you choose "Direct", the BIOS won't be used, and if you
  2487. choose "MMConfig", then PCI Express MMCONFIG will be used.
  2488. If you choose "Any", the kernel will try MMCONFIG, then the
  2489. direct access method and falls back to the BIOS if that doesn't
  2490. work. If unsure, go with the default, which is "Any".
  2491. config PCI_GOBIOS
  2492. bool "BIOS"
  2493. config PCI_GOMMCONFIG
  2494. bool "MMConfig"
  2495. config PCI_GODIRECT
  2496. bool "Direct"
  2497. config PCI_GOOLPC
  2498. bool "OLPC XO-1"
  2499. depends on OLPC
  2500. config PCI_GOANY
  2501. bool "Any"
  2502. endchoice
  2503. config PCI_BIOS
  2504. def_bool y
  2505. depends on X86_32 && PCI && (PCI_GOBIOS || PCI_GOANY)
  2506. # x86-64 doesn't support PCI BIOS access from long mode so always go direct.
  2507. config PCI_DIRECT
  2508. def_bool y
  2509. depends on PCI && (X86_64 || (PCI_GODIRECT || PCI_GOANY || PCI_GOOLPC || PCI_GOMMCONFIG))
  2510. config PCI_MMCONFIG
  2511. bool "Support mmconfig PCI config space access" if X86_64
  2512. default y
  2513. depends on PCI && (ACPI || JAILHOUSE_GUEST)
  2514. depends on X86_64 || (PCI_GOANY || PCI_GOMMCONFIG)
  2515. config PCI_OLPC
  2516. def_bool y
  2517. depends on PCI && OLPC && (PCI_GOOLPC || PCI_GOANY)
  2518. config PCI_XEN
  2519. def_bool y
  2520. depends on PCI && XEN
  2521. config MMCONF_FAM10H
  2522. def_bool y
  2523. depends on X86_64 && PCI_MMCONFIG && ACPI
  2524. config PCI_CNB20LE_QUIRK
  2525. bool "Read CNB20LE Host Bridge Windows" if EXPERT
  2526. depends on PCI
  2527. help
  2528. Read the PCI windows out of the CNB20LE host bridge. This allows
  2529. PCI hotplug to work on systems with the CNB20LE chipset which do
  2530. not have ACPI.
  2531. There's no public spec for this chipset, and this functionality
  2532. is known to be incomplete.
  2533. You should say N unless you know you need this.
  2534. config ISA_BUS
  2535. bool "ISA bus support on modern systems" if EXPERT
  2536. help
  2537. Expose ISA bus device drivers and options available for selection and
  2538. configuration. Enable this option if your target machine has an ISA
  2539. bus. ISA is an older system, displaced by PCI and newer bus
  2540. architectures -- if your target machine is modern, it probably does
  2541. not have an ISA bus.
  2542. If unsure, say N.
  2543. # x86_64 have no ISA slots, but can have ISA-style DMA.
  2544. config ISA_DMA_API
  2545. bool "ISA-style DMA support" if (X86_64 && EXPERT)
  2546. default y
  2547. help
  2548. Enables ISA-style DMA support for devices requiring such controllers.
  2549. If unsure, say Y.
  2550. if X86_32
  2551. config ISA
  2552. bool "ISA support"
  2553. help
  2554. Find out whether you have ISA slots on your motherboard. ISA is the
  2555. name of a bus system, i.e. the way the CPU talks to the other stuff
  2556. inside your box. Other bus systems are PCI, EISA, MicroChannel
  2557. (MCA) or VESA. ISA is an older system, now being displaced by PCI;
  2558. newer boards don't support it. If you have ISA, say Y, otherwise N.
  2559. config SCx200
  2560. tristate "NatSemi SCx200 support"
  2561. help
  2562. This provides basic support for National Semiconductor's
  2563. (now AMD's) Geode processors. The driver probes for the
  2564. PCI-IDs of several on-chip devices, so its a good dependency
  2565. for other scx200_* drivers.
  2566. If compiled as a module, the driver is named scx200.
  2567. config SCx200HR_TIMER
  2568. tristate "NatSemi SCx200 27MHz High-Resolution Timer Support"
  2569. depends on SCx200
  2570. default y
  2571. help
  2572. This driver provides a clocksource built upon the on-chip
  2573. 27MHz high-resolution timer. Its also a workaround for
  2574. NSC Geode SC-1100's buggy TSC, which loses time when the
  2575. processor goes idle (as is done by the scheduler). The
  2576. other workaround is idle=poll boot option.
  2577. config OLPC
  2578. bool "One Laptop Per Child support"
  2579. depends on !X86_PAE
  2580. select GPIOLIB
  2581. select OF
  2582. select OF_PROMTREE
  2583. select IRQ_DOMAIN
  2584. select OLPC_EC
  2585. help
  2586. Add support for detecting the unique features of the OLPC
  2587. XO hardware.
  2588. config OLPC_XO1_PM
  2589. bool "OLPC XO-1 Power Management"
  2590. depends on OLPC && MFD_CS5535=y && PM_SLEEP
  2591. help
  2592. Add support for poweroff and suspend of the OLPC XO-1 laptop.
  2593. config OLPC_XO1_RTC
  2594. bool "OLPC XO-1 Real Time Clock"
  2595. depends on OLPC_XO1_PM && RTC_DRV_CMOS
  2596. help
  2597. Add support for the XO-1 real time clock, which can be used as a
  2598. programmable wakeup source.
  2599. config OLPC_XO1_SCI
  2600. bool "OLPC XO-1 SCI extras"
  2601. depends on OLPC && OLPC_XO1_PM && GPIO_CS5535=y
  2602. depends on INPUT=y
  2603. select POWER_SUPPLY
  2604. help
  2605. Add support for SCI-based features of the OLPC XO-1 laptop:
  2606. - EC-driven system wakeups
  2607. - Power button
  2608. - Ebook switch
  2609. - Lid switch
  2610. - AC adapter status updates
  2611. - Battery status updates
  2612. config OLPC_XO15_SCI
  2613. bool "OLPC XO-1.5 SCI extras"
  2614. depends on OLPC && ACPI
  2615. select POWER_SUPPLY
  2616. help
  2617. Add support for SCI-based features of the OLPC XO-1.5 laptop:
  2618. - EC-driven system wakeups
  2619. - AC adapter status updates
  2620. - Battery status updates
  2621. config GEODE_COMMON
  2622. bool
  2623. config ALIX
  2624. bool "PCEngines ALIX System Support (LED setup)"
  2625. select GPIOLIB
  2626. select GEODE_COMMON
  2627. help
  2628. This option enables system support for the PCEngines ALIX.
  2629. At present this just sets up LEDs for GPIO control on
  2630. ALIX2/3/6 boards. However, other system specific setup should
  2631. get added here.
  2632. Note: You must still enable the drivers for GPIO and LED support
  2633. (GPIO_CS5535 & LEDS_GPIO) to actually use the LEDs
  2634. Note: You have to set alix.force=1 for boards with Award BIOS.
  2635. config NET5501
  2636. bool "Soekris Engineering net5501 System Support (LEDS, GPIO, etc)"
  2637. select GPIOLIB
  2638. select GEODE_COMMON
  2639. help
  2640. This option enables system support for the Soekris Engineering net5501.
  2641. config GEOS
  2642. bool "Traverse Technologies GEOS System Support (LEDS, GPIO, etc)"
  2643. select GPIOLIB
  2644. select GEODE_COMMON
  2645. depends on DMI
  2646. help
  2647. This option enables system support for the Traverse Technologies GEOS.
  2648. config TS5500
  2649. bool "Technologic Systems TS-5500 platform support"
  2650. depends on MELAN
  2651. select CHECK_SIGNATURE
  2652. select NEW_LEDS
  2653. select LEDS_CLASS
  2654. help
  2655. This option enables system support for the Technologic Systems TS-5500.
  2656. endif # X86_32
  2657. config AMD_NB
  2658. def_bool y
  2659. depends on CPU_SUP_AMD && PCI
  2660. endmenu
  2661. menu "Binary Emulations"
  2662. config IA32_EMULATION
  2663. bool "IA32 Emulation"
  2664. depends on X86_64
  2665. select ARCH_WANT_OLD_COMPAT_IPC
  2666. select BINFMT_ELF
  2667. select COMPAT_OLD_SIGACTION
  2668. help
  2669. Include code to run legacy 32-bit programs under a
  2670. 64-bit kernel. You should likely turn this on, unless you're
  2671. 100% sure that you don't have any 32-bit programs left.
  2672. config IA32_EMULATION_DEFAULT_DISABLED
  2673. bool "IA32 emulation disabled by default"
  2674. default n
  2675. depends on IA32_EMULATION
  2676. help
  2677. Make IA32 emulation disabled by default. This prevents loading 32-bit
  2678. processes and access to 32-bit syscalls. If unsure, leave it to its
  2679. default value.
  2680. config X86_X32_ABI
  2681. bool "x32 ABI for 64-bit mode"
  2682. depends on X86_64
  2683. # llvm-objcopy does not convert x86_64 .note.gnu.property or
  2684. # compressed debug sections to x86_x32 properly:
  2685. # https://github.com/ClangBuiltLinux/linux/issues/514
  2686. # https://github.com/ClangBuiltLinux/linux/issues/1141
  2687. depends on $(success,$(OBJCOPY) --version | head -n1 | grep -qv llvm)
  2688. help
  2689. Include code to run binaries for the x32 native 32-bit ABI
  2690. for 64-bit processors. An x32 process gets access to the
  2691. full 64-bit register file and wide data path while leaving
  2692. pointers at 32 bits for smaller memory footprint.
  2693. config COMPAT_32
  2694. def_bool y
  2695. depends on IA32_EMULATION || X86_32
  2696. select HAVE_UID16
  2697. select OLD_SIGSUSPEND3
  2698. config COMPAT
  2699. def_bool y
  2700. depends on IA32_EMULATION || X86_X32_ABI
  2701. config COMPAT_FOR_U64_ALIGNMENT
  2702. def_bool y
  2703. depends on COMPAT
  2704. endmenu
  2705. config HAVE_ATOMIC_IOMAP
  2706. def_bool y
  2707. depends on X86_32
  2708. source "arch/x86/kvm/Kconfig"
  2709. source "arch/x86/Kconfig.assembler"