Kconfig 106 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218
  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 if X86_64
  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 if X86_32
  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. depends on PARAVIRT
  796. select ARCH_HAS_CC_PLATFORM
  797. select X86_MEM_ENCRYPT
  798. select X86_MCE
  799. select UNACCEPTED_MEMORY
  800. help
  801. Support running as a guest under Intel TDX. Without this support,
  802. the guest kernel can not boot or run under TDX.
  803. TDX includes memory encryption and integrity capabilities
  804. which protect the confidentiality and integrity of guest
  805. memory contents and CPU state. TDX guests are protected from
  806. some attacks from the VMM.
  807. endif # HYPERVISOR_GUEST
  808. source "arch/x86/Kconfig.cpu"
  809. config HPET_TIMER
  810. def_bool X86_64
  811. prompt "HPET Timer Support" if X86_32
  812. help
  813. Use the IA-PC HPET (High Precision Event Timer) to manage
  814. time in preference to the PIT and RTC, if a HPET is
  815. present.
  816. HPET is the next generation timer replacing legacy 8254s.
  817. The HPET provides a stable time base on SMP
  818. systems, unlike the TSC, but it is more expensive to access,
  819. as it is off-chip. The interface used is documented
  820. in the HPET spec, revision 1.
  821. You can safely choose Y here. However, HPET will only be
  822. activated if the platform and the BIOS support this feature.
  823. Otherwise the 8254 will be used for timing services.
  824. Choose N to continue using the legacy 8254 timer.
  825. config HPET_EMULATE_RTC
  826. def_bool y
  827. depends on HPET_TIMER && (RTC_DRV_CMOS=m || RTC_DRV_CMOS=y)
  828. # Mark as expert because too many people got it wrong.
  829. # The code disables itself when not needed.
  830. config DMI
  831. default y
  832. select DMI_SCAN_MACHINE_NON_EFI_FALLBACK
  833. bool "Enable DMI scanning" if EXPERT
  834. help
  835. Enabled scanning of DMI to identify machine quirks. Say Y
  836. here unless you have verified that your setup is not
  837. affected by entries in the DMI blacklist. Required by PNP
  838. BIOS code.
  839. config GART_IOMMU
  840. bool "Old AMD GART IOMMU support"
  841. select IOMMU_HELPER
  842. select SWIOTLB
  843. depends on X86_64 && PCI && AMD_NB
  844. help
  845. Provides a driver for older AMD Athlon64/Opteron/Turion/Sempron
  846. GART based hardware IOMMUs.
  847. The GART supports full DMA access for devices with 32-bit access
  848. limitations, on systems with more than 3 GB. This is usually needed
  849. for USB, sound, many IDE/SATA chipsets and some other devices.
  850. Newer systems typically have a modern AMD IOMMU, supported via
  851. the CONFIG_AMD_IOMMU=y config option.
  852. In normal configurations this driver is only active when needed:
  853. there's more than 3 GB of memory and the system contains a
  854. 32-bit limited device.
  855. If unsure, say Y.
  856. config BOOT_VESA_SUPPORT
  857. bool
  858. help
  859. If true, at least one selected framebuffer driver can take advantage
  860. of VESA video modes set at an early boot stage via the vga= parameter.
  861. config MAXSMP
  862. bool "Enable Maximum number of SMP Processors and NUMA Nodes"
  863. depends on X86_64 && SMP && DEBUG_KERNEL
  864. select CPUMASK_OFFSTACK
  865. help
  866. Enable maximum number of CPUS and NUMA Nodes for this architecture.
  867. If unsure, say N.
  868. #
  869. # The maximum number of CPUs supported:
  870. #
  871. # The main config value is NR_CPUS, which defaults to NR_CPUS_DEFAULT,
  872. # and which can be configured interactively in the
  873. # [NR_CPUS_RANGE_BEGIN ... NR_CPUS_RANGE_END] range.
  874. #
  875. # The ranges are different on 32-bit and 64-bit kernels, depending on
  876. # hardware capabilities and scalability features of the kernel.
  877. #
  878. # ( If MAXSMP is enabled we just use the highest possible value and disable
  879. # interactive configuration. )
  880. #
  881. config NR_CPUS_RANGE_BEGIN
  882. int
  883. default NR_CPUS_RANGE_END if MAXSMP
  884. default 1 if !SMP
  885. default 2
  886. config NR_CPUS_RANGE_END
  887. int
  888. depends on X86_32
  889. default 64 if SMP && X86_BIGSMP
  890. default 8 if SMP && !X86_BIGSMP
  891. default 1 if !SMP
  892. config NR_CPUS_RANGE_END
  893. int
  894. depends on X86_64
  895. default 8192 if SMP && CPUMASK_OFFSTACK
  896. default 512 if SMP && !CPUMASK_OFFSTACK
  897. default 1 if !SMP
  898. config NR_CPUS_DEFAULT
  899. int
  900. depends on X86_32
  901. default 32 if X86_BIGSMP
  902. default 8 if SMP
  903. default 1 if !SMP
  904. config NR_CPUS_DEFAULT
  905. int
  906. depends on X86_64
  907. default 8192 if MAXSMP
  908. default 64 if SMP
  909. default 1 if !SMP
  910. config NR_CPUS
  911. int "Maximum number of CPUs" if SMP && !MAXSMP
  912. range NR_CPUS_RANGE_BEGIN NR_CPUS_RANGE_END
  913. default NR_CPUS_DEFAULT
  914. help
  915. This allows you to specify the maximum number of CPUs which this
  916. kernel will support. If CPUMASK_OFFSTACK is enabled, the maximum
  917. supported value is 8192, otherwise the maximum value is 512. The
  918. minimum value which makes sense is 2.
  919. This is purely to save memory: each supported CPU adds about 8KB
  920. to the kernel image.
  921. config SCHED_CLUSTER
  922. bool "Cluster scheduler support"
  923. depends on SMP
  924. default y
  925. help
  926. Cluster scheduler support improves the CPU scheduler's decision
  927. making when dealing with machines that have clusters of CPUs.
  928. Cluster usually means a couple of CPUs which are placed closely
  929. by sharing mid-level caches, last-level cache tags or internal
  930. busses.
  931. config SCHED_SMT
  932. def_bool y if SMP
  933. config SCHED_MC
  934. def_bool y
  935. prompt "Multi-core scheduler support"
  936. depends on SMP
  937. help
  938. Multi-core scheduler support improves the CPU scheduler's decision
  939. making when dealing with multi-core CPU chips at a cost of slightly
  940. increased overhead in some places. If unsure say N here.
  941. config SCHED_MC_PRIO
  942. bool "CPU core priorities scheduler support"
  943. depends on SCHED_MC
  944. select X86_INTEL_PSTATE if CPU_SUP_INTEL
  945. select X86_AMD_PSTATE if CPU_SUP_AMD && ACPI
  946. select CPU_FREQ
  947. default y
  948. help
  949. Intel Turbo Boost Max Technology 3.0 enabled CPUs have a
  950. core ordering determined at manufacturing time, which allows
  951. certain cores to reach higher turbo frequencies (when running
  952. single threaded workloads) than others.
  953. Enabling this kernel feature teaches the scheduler about
  954. the TBM3 (aka ITMT) priority order of the CPU cores and adjusts the
  955. scheduler's CPU selection logic accordingly, so that higher
  956. overall system performance can be achieved.
  957. This feature will have no effect on CPUs without this feature.
  958. If unsure say Y here.
  959. config UP_LATE_INIT
  960. def_bool y
  961. depends on !SMP && X86_LOCAL_APIC
  962. config X86_UP_APIC
  963. bool "Local APIC support on uniprocessors" if !PCI_MSI
  964. default PCI_MSI
  965. depends on X86_32 && !SMP && !X86_32_NON_STANDARD
  966. help
  967. A local APIC (Advanced Programmable Interrupt Controller) is an
  968. integrated interrupt controller in the CPU. If you have a single-CPU
  969. system which has a processor with a local APIC, you can say Y here to
  970. enable and use it. If you say Y here even though your machine doesn't
  971. have a local APIC, then the kernel will still run with no slowdown at
  972. all. The local APIC supports CPU-generated self-interrupts (timer,
  973. performance counters), and the NMI watchdog which detects hard
  974. lockups.
  975. config X86_UP_IOAPIC
  976. bool "IO-APIC support on uniprocessors"
  977. depends on X86_UP_APIC
  978. help
  979. An IO-APIC (I/O Advanced Programmable Interrupt Controller) is an
  980. SMP-capable replacement for PC-style interrupt controllers. Most
  981. SMP systems and many recent uniprocessor systems have one.
  982. If you have a single-CPU system with an IO-APIC, you can say Y here
  983. to use it. If you say Y here even though your machine doesn't have
  984. an IO-APIC, then the kernel will still run with no slowdown at all.
  985. config X86_LOCAL_APIC
  986. def_bool y
  987. depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_APIC || PCI_MSI
  988. select IRQ_DOMAIN_HIERARCHY
  989. config ACPI_MADT_WAKEUP
  990. def_bool y
  991. depends on X86_64
  992. depends on ACPI
  993. depends on SMP
  994. depends on X86_LOCAL_APIC
  995. config X86_IO_APIC
  996. def_bool y
  997. depends on X86_LOCAL_APIC || X86_UP_IOAPIC
  998. config X86_REROUTE_FOR_BROKEN_BOOT_IRQS
  999. bool "Reroute for broken boot IRQs"
  1000. depends on X86_IO_APIC
  1001. help
  1002. This option enables a workaround that fixes a source of
  1003. spurious interrupts. This is recommended when threaded
  1004. interrupt handling is used on systems where the generation of
  1005. superfluous "boot interrupts" cannot be disabled.
  1006. Some chipsets generate a legacy INTx "boot IRQ" when the IRQ
  1007. entry in the chipset's IO-APIC is masked (as, e.g. the RT
  1008. kernel does during interrupt handling). On chipsets where this
  1009. boot IRQ generation cannot be disabled, this workaround keeps
  1010. the original IRQ line masked so that only the equivalent "boot
  1011. IRQ" is delivered to the CPUs. The workaround also tells the
  1012. kernel to set up the IRQ handler on the boot IRQ line. In this
  1013. way only one interrupt is delivered to the kernel. Otherwise
  1014. the spurious second interrupt may cause the kernel to bring
  1015. down (vital) interrupt lines.
  1016. Only affects "broken" chipsets. Interrupt sharing may be
  1017. increased on these systems.
  1018. config X86_MCE
  1019. bool "Machine Check / overheating reporting"
  1020. select GENERIC_ALLOCATOR
  1021. default y
  1022. help
  1023. Machine Check support allows the processor to notify the
  1024. kernel if it detects a problem (e.g. overheating, data corruption).
  1025. The action the kernel takes depends on the severity of the problem,
  1026. ranging from warning messages to halting the machine.
  1027. config X86_MCELOG_LEGACY
  1028. bool "Support for deprecated /dev/mcelog character device"
  1029. depends on X86_MCE
  1030. help
  1031. Enable support for /dev/mcelog which is needed by the old mcelog
  1032. userspace logging daemon. Consider switching to the new generation
  1033. rasdaemon solution.
  1034. config X86_MCE_INTEL
  1035. def_bool y
  1036. prompt "Intel MCE features"
  1037. depends on X86_MCE && X86_LOCAL_APIC
  1038. help
  1039. Additional support for intel specific MCE features such as
  1040. the thermal monitor.
  1041. config X86_MCE_AMD
  1042. def_bool y
  1043. prompt "AMD MCE features"
  1044. depends on X86_MCE && X86_LOCAL_APIC && AMD_NB
  1045. help
  1046. Additional support for AMD specific MCE features such as
  1047. the DRAM Error Threshold.
  1048. config X86_ANCIENT_MCE
  1049. bool "Support for old Pentium 5 / WinChip machine checks"
  1050. depends on X86_32 && X86_MCE
  1051. help
  1052. Include support for machine check handling on old Pentium 5 or WinChip
  1053. systems. These typically need to be enabled explicitly on the command
  1054. line.
  1055. config X86_MCE_THRESHOLD
  1056. depends on X86_MCE_AMD || X86_MCE_INTEL
  1057. def_bool y
  1058. config X86_MCE_INJECT
  1059. depends on X86_MCE && X86_LOCAL_APIC && DEBUG_FS
  1060. tristate "Machine check injector support"
  1061. help
  1062. Provide support for injecting machine checks for testing purposes.
  1063. If you don't know what a machine check is and you don't do kernel
  1064. QA it is safe to say n.
  1065. source "arch/x86/events/Kconfig"
  1066. config X86_LEGACY_VM86
  1067. bool "Legacy VM86 support"
  1068. depends on X86_32
  1069. help
  1070. This option allows user programs to put the CPU into V8086
  1071. mode, which is an 80286-era approximation of 16-bit real mode.
  1072. Some very old versions of X and/or vbetool require this option
  1073. for user mode setting. Similarly, DOSEMU will use it if
  1074. available to accelerate real mode DOS programs. However, any
  1075. recent version of DOSEMU, X, or vbetool should be fully
  1076. functional even without kernel VM86 support, as they will all
  1077. fall back to software emulation. Nevertheless, if you are using
  1078. a 16-bit DOS program where 16-bit performance matters, vm86
  1079. mode might be faster than emulation and you might want to
  1080. enable this option.
  1081. Note that any app that works on a 64-bit kernel is unlikely to
  1082. need this option, as 64-bit kernels don't, and can't, support
  1083. V8086 mode. This option is also unrelated to 16-bit protected
  1084. mode and is not needed to run most 16-bit programs under Wine.
  1085. Enabling this option increases the complexity of the kernel
  1086. and slows down exception handling a tiny bit.
  1087. If unsure, say N here.
  1088. config VM86
  1089. bool
  1090. default X86_LEGACY_VM86
  1091. config X86_16BIT
  1092. bool "Enable support for 16-bit segments" if EXPERT
  1093. default y
  1094. depends on MODIFY_LDT_SYSCALL
  1095. help
  1096. This option is required by programs like Wine to run 16-bit
  1097. protected mode legacy code on x86 processors. Disabling
  1098. this option saves about 300 bytes on i386, or around 6K text
  1099. plus 16K runtime memory on x86-64,
  1100. config X86_ESPFIX32
  1101. def_bool y
  1102. depends on X86_16BIT && X86_32
  1103. config X86_ESPFIX64
  1104. def_bool y
  1105. depends on X86_16BIT && X86_64
  1106. config X86_VSYSCALL_EMULATION
  1107. bool "Enable vsyscall emulation" if EXPERT
  1108. default y
  1109. depends on X86_64
  1110. help
  1111. This enables emulation of the legacy vsyscall page. Disabling
  1112. it is roughly equivalent to booting with vsyscall=none, except
  1113. that it will also disable the helpful warning if a program
  1114. tries to use a vsyscall. With this option set to N, offending
  1115. programs will just segfault, citing addresses of the form
  1116. 0xffffffffff600?00.
  1117. This option is required by many programs built before 2013, and
  1118. care should be used even with newer programs if set to N.
  1119. Disabling this option saves about 7K of kernel size and
  1120. possibly 4K of additional runtime pagetable memory.
  1121. config X86_IOPL_IOPERM
  1122. bool "IOPERM and IOPL Emulation"
  1123. default y
  1124. help
  1125. This enables the ioperm() and iopl() syscalls which are necessary
  1126. for legacy applications.
  1127. Legacy IOPL support is an overbroad mechanism which allows user
  1128. space aside of accessing all 65536 I/O ports also to disable
  1129. interrupts. To gain this access the caller needs CAP_SYS_RAWIO
  1130. capabilities and permission from potentially active security
  1131. modules.
  1132. The emulation restricts the functionality of the syscall to
  1133. only allowing the full range I/O port access, but prevents the
  1134. ability to disable interrupts from user space which would be
  1135. granted if the hardware IOPL mechanism would be used.
  1136. config TOSHIBA
  1137. tristate "Toshiba Laptop support"
  1138. depends on X86_32
  1139. help
  1140. This adds a driver to safely access the System Management Mode of
  1141. the CPU on Toshiba portables with a genuine Toshiba BIOS. It does
  1142. not work on models with a Phoenix BIOS. The System Management Mode
  1143. is used to set the BIOS and power saving options on Toshiba portables.
  1144. For information on utilities to make use of this driver see the
  1145. Toshiba Linux utilities web site at:
  1146. <http://www.buzzard.org.uk/toshiba/>.
  1147. Say Y if you intend to run this kernel on a Toshiba portable.
  1148. Say N otherwise.
  1149. config X86_REBOOTFIXUPS
  1150. bool "Enable X86 board specific fixups for reboot"
  1151. depends on X86_32
  1152. help
  1153. This enables chipset and/or board specific fixups to be done
  1154. in order to get reboot to work correctly. This is only needed on
  1155. some combinations of hardware and BIOS. The symptom, for which
  1156. this config is intended, is when reboot ends with a stalled/hung
  1157. system.
  1158. Currently, the only fixup is for the Geode machines using
  1159. CS5530A and CS5536 chipsets and the RDC R-321x SoC.
  1160. Say Y if you want to enable the fixup. Currently, it's safe to
  1161. enable this option even if you don't need it.
  1162. Say N otherwise.
  1163. config MICROCODE
  1164. def_bool y
  1165. depends on CPU_SUP_AMD || CPU_SUP_INTEL
  1166. select CRYPTO_LIB_SHA256 if CPU_SUP_AMD
  1167. config MICROCODE_INITRD32
  1168. def_bool y
  1169. depends on MICROCODE && X86_32 && BLK_DEV_INITRD
  1170. config MICROCODE_LATE_LOADING
  1171. bool "Late microcode loading (DANGEROUS)"
  1172. default n
  1173. depends on MICROCODE && SMP
  1174. help
  1175. Loading microcode late, when the system is up and executing instructions
  1176. is a tricky business and should be avoided if possible. Just the sequence
  1177. of synchronizing all cores and SMT threads is one fragile dance which does
  1178. not guarantee that cores might not softlock after the loading. Therefore,
  1179. use this at your own risk. Late loading taints the kernel unless the
  1180. microcode header indicates that it is safe for late loading via the
  1181. minimal revision check. This minimal revision check can be enforced on
  1182. the kernel command line with "microcode.minrev=Y".
  1183. config MICROCODE_LATE_FORCE_MINREV
  1184. bool "Enforce late microcode loading minimal revision check"
  1185. default n
  1186. depends on MICROCODE_LATE_LOADING
  1187. help
  1188. To prevent that users load microcode late which modifies already
  1189. in use features, newer microcode patches have a minimum revision field
  1190. in the microcode header, which tells the kernel which minimum
  1191. revision must be active in the CPU to safely load that new microcode
  1192. late into the running system. If disabled the check will not
  1193. be enforced but the kernel will be tainted when the minimal
  1194. revision check fails.
  1195. This minimal revision check can also be controlled via the
  1196. "microcode.minrev" parameter on the kernel command line.
  1197. If unsure say Y.
  1198. config X86_MSR
  1199. tristate "/dev/cpu/*/msr - Model-specific register support"
  1200. help
  1201. This device gives privileged processes access to the x86
  1202. Model-Specific Registers (MSRs). It is a character device with
  1203. major 202 and minors 0 to 31 for /dev/cpu/0/msr to /dev/cpu/31/msr.
  1204. MSR accesses are directed to a specific CPU on multi-processor
  1205. systems.
  1206. config X86_CPUID
  1207. tristate "/dev/cpu/*/cpuid - CPU information support"
  1208. help
  1209. This device gives processes access to the x86 CPUID instruction to
  1210. be executed on a specific processor. It is a character device
  1211. with major 203 and minors 0 to 31 for /dev/cpu/0/cpuid to
  1212. /dev/cpu/31/cpuid.
  1213. choice
  1214. prompt "High Memory Support"
  1215. default HIGHMEM4G
  1216. depends on X86_32
  1217. config NOHIGHMEM
  1218. bool "off"
  1219. help
  1220. Linux can use up to 64 Gigabytes of physical memory on x86 systems.
  1221. However, the address space of 32-bit x86 processors is only 4
  1222. Gigabytes large. That means that, if you have a large amount of
  1223. physical memory, not all of it can be "permanently mapped" by the
  1224. kernel. The physical memory that's not permanently mapped is called
  1225. "high memory".
  1226. If you are compiling a kernel which will never run on a machine with
  1227. more than 1 Gigabyte total physical RAM, answer "off" here (default
  1228. choice and suitable for most users). This will result in a "3GB/1GB"
  1229. split: 3GB are mapped so that each process sees a 3GB virtual memory
  1230. space and the remaining part of the 4GB virtual memory space is used
  1231. by the kernel to permanently map as much physical memory as
  1232. possible.
  1233. If the machine has between 1 and 4 Gigabytes physical RAM, then
  1234. answer "4GB" here.
  1235. If more than 4 Gigabytes is used then answer "64GB" here. This
  1236. selection turns Intel PAE (Physical Address Extension) mode on.
  1237. PAE implements 3-level paging on IA32 processors. PAE is fully
  1238. supported by Linux, PAE mode is implemented on all recent Intel
  1239. processors (Pentium Pro and better). NOTE: If you say "64GB" here,
  1240. then the kernel will not boot on CPUs that don't support PAE!
  1241. The actual amount of total physical memory will either be
  1242. auto detected or can be forced by using a kernel command line option
  1243. such as "mem=256M". (Try "man bootparam" or see the documentation of
  1244. your boot loader (lilo or loadlin) about how to pass options to the
  1245. kernel at boot time.)
  1246. If unsure, say "off".
  1247. config HIGHMEM4G
  1248. bool "4GB"
  1249. help
  1250. Select this if you have a 32-bit processor and between 1 and 4
  1251. gigabytes of physical RAM.
  1252. config HIGHMEM64G
  1253. bool "64GB"
  1254. depends on X86_HAVE_PAE
  1255. select X86_PAE
  1256. help
  1257. Select this if you have a 32-bit processor and more than 4
  1258. gigabytes of physical RAM.
  1259. endchoice
  1260. choice
  1261. prompt "Memory split" if EXPERT
  1262. default VMSPLIT_3G
  1263. depends on X86_32
  1264. help
  1265. Select the desired split between kernel and user memory.
  1266. If the address range available to the kernel is less than the
  1267. physical memory installed, the remaining memory will be available
  1268. as "high memory". Accessing high memory is a little more costly
  1269. than low memory, as it needs to be mapped into the kernel first.
  1270. Note that increasing the kernel address space limits the range
  1271. available to user programs, making the address space there
  1272. tighter. Selecting anything other than the default 3G/1G split
  1273. will also likely make your kernel incompatible with binary-only
  1274. kernel modules.
  1275. If you are not absolutely sure what you are doing, leave this
  1276. option alone!
  1277. config VMSPLIT_3G
  1278. bool "3G/1G user/kernel split"
  1279. config VMSPLIT_3G_OPT
  1280. depends on !X86_PAE
  1281. bool "3G/1G user/kernel split (for full 1G low memory)"
  1282. config VMSPLIT_2G
  1283. bool "2G/2G user/kernel split"
  1284. config VMSPLIT_2G_OPT
  1285. depends on !X86_PAE
  1286. bool "2G/2G user/kernel split (for full 2G low memory)"
  1287. config VMSPLIT_1G
  1288. bool "1G/3G user/kernel split"
  1289. endchoice
  1290. config PAGE_OFFSET
  1291. hex
  1292. default 0xB0000000 if VMSPLIT_3G_OPT
  1293. default 0x80000000 if VMSPLIT_2G
  1294. default 0x78000000 if VMSPLIT_2G_OPT
  1295. default 0x40000000 if VMSPLIT_1G
  1296. default 0xC0000000
  1297. depends on X86_32
  1298. config HIGHMEM
  1299. def_bool y
  1300. depends on X86_32 && (HIGHMEM64G || HIGHMEM4G)
  1301. config X86_PAE
  1302. bool "PAE (Physical Address Extension) Support"
  1303. depends on X86_32 && X86_HAVE_PAE
  1304. select PHYS_ADDR_T_64BIT
  1305. select SWIOTLB
  1306. help
  1307. PAE is required for NX support, and furthermore enables
  1308. larger swapspace support for non-overcommit purposes. It
  1309. has the cost of more pagetable lookup overhead, and also
  1310. consumes more pagetable space per process.
  1311. config X86_5LEVEL
  1312. bool "Enable 5-level page tables support"
  1313. default y
  1314. select DYNAMIC_MEMORY_LAYOUT
  1315. select SPARSEMEM_VMEMMAP
  1316. depends on X86_64
  1317. help
  1318. 5-level paging enables access to larger address space:
  1319. up to 128 PiB of virtual address space and 4 PiB of
  1320. physical address space.
  1321. It will be supported by future Intel CPUs.
  1322. A kernel with the option enabled can be booted on machines that
  1323. support 4- or 5-level paging.
  1324. See Documentation/arch/x86/x86_64/5level-paging.rst for more
  1325. information.
  1326. Say N if unsure.
  1327. config X86_DIRECT_GBPAGES
  1328. def_bool y
  1329. depends on X86_64
  1330. help
  1331. Certain kernel features effectively disable kernel
  1332. linear 1 GB mappings (even if the CPU otherwise
  1333. supports them), so don't confuse the user by printing
  1334. that we have them enabled.
  1335. config X86_CPA_STATISTICS
  1336. bool "Enable statistic for Change Page Attribute"
  1337. depends on DEBUG_FS
  1338. help
  1339. Expose statistics about the Change Page Attribute mechanism, which
  1340. helps to determine the effectiveness of preserving large and huge
  1341. page mappings when mapping protections are changed.
  1342. config X86_MEM_ENCRYPT
  1343. select ARCH_HAS_FORCE_DMA_UNENCRYPTED
  1344. select DYNAMIC_PHYSICAL_MASK
  1345. def_bool n
  1346. config AMD_MEM_ENCRYPT
  1347. bool "AMD Secure Memory Encryption (SME) support"
  1348. depends on X86_64 && CPU_SUP_AMD
  1349. depends on EFI_STUB
  1350. select DMA_COHERENT_POOL
  1351. select ARCH_USE_MEMREMAP_PROT
  1352. select INSTRUCTION_DECODER
  1353. select ARCH_HAS_CC_PLATFORM
  1354. select X86_MEM_ENCRYPT
  1355. select UNACCEPTED_MEMORY
  1356. help
  1357. Say yes to enable support for the encryption of system memory.
  1358. This requires an AMD processor that supports Secure Memory
  1359. Encryption (SME).
  1360. # Common NUMA Features
  1361. config NUMA
  1362. bool "NUMA Memory Allocation and Scheduler Support"
  1363. depends on SMP
  1364. depends on X86_64 || (X86_32 && HIGHMEM64G && X86_BIGSMP)
  1365. default y if X86_BIGSMP
  1366. select USE_PERCPU_NUMA_NODE_ID
  1367. select OF_NUMA if OF
  1368. help
  1369. Enable NUMA (Non-Uniform Memory Access) support.
  1370. The kernel will try to allocate memory used by a CPU on the
  1371. local memory controller of the CPU and add some more
  1372. NUMA awareness to the kernel.
  1373. For 64-bit this is recommended if the system is Intel Core i7
  1374. (or later), AMD Opteron, or EM64T NUMA.
  1375. For 32-bit this is only needed if you boot a 32-bit
  1376. kernel on a 64-bit NUMA platform.
  1377. Otherwise, you should say N.
  1378. config AMD_NUMA
  1379. def_bool y
  1380. prompt "Old style AMD Opteron NUMA detection"
  1381. depends on X86_64 && NUMA && PCI
  1382. help
  1383. Enable AMD NUMA node topology detection. You should say Y here if
  1384. you have a multi processor AMD system. This uses an old method to
  1385. read the NUMA configuration directly from the builtin Northbridge
  1386. of Opteron. It is recommended to use X86_64_ACPI_NUMA instead,
  1387. which also takes priority if both are compiled in.
  1388. config X86_64_ACPI_NUMA
  1389. def_bool y
  1390. prompt "ACPI NUMA detection"
  1391. depends on X86_64 && NUMA && ACPI && PCI
  1392. select ACPI_NUMA
  1393. help
  1394. Enable ACPI SRAT based node topology detection.
  1395. config NODES_SHIFT
  1396. int "Maximum NUMA Nodes (as a power of 2)" if !MAXSMP
  1397. range 1 10
  1398. default "10" if MAXSMP
  1399. default "6" if X86_64
  1400. default "3"
  1401. depends on NUMA
  1402. help
  1403. Specify the maximum number of NUMA Nodes available on the target
  1404. system. Increases memory reserved to accommodate various tables.
  1405. config ARCH_FLATMEM_ENABLE
  1406. def_bool y
  1407. depends on X86_32 && !NUMA
  1408. config ARCH_SPARSEMEM_ENABLE
  1409. def_bool y
  1410. depends on X86_64 || NUMA || X86_32 || X86_32_NON_STANDARD
  1411. select SPARSEMEM_STATIC if X86_32
  1412. select SPARSEMEM_VMEMMAP_ENABLE if X86_64
  1413. config ARCH_SPARSEMEM_DEFAULT
  1414. def_bool X86_64 || (NUMA && X86_32)
  1415. config ARCH_SELECT_MEMORY_MODEL
  1416. def_bool y
  1417. depends on ARCH_SPARSEMEM_ENABLE && ARCH_FLATMEM_ENABLE
  1418. config ARCH_MEMORY_PROBE
  1419. bool "Enable sysfs memory/probe interface"
  1420. depends on MEMORY_HOTPLUG
  1421. help
  1422. This option enables a sysfs memory/probe interface for testing.
  1423. See Documentation/admin-guide/mm/memory-hotplug.rst for more information.
  1424. If you are unsure how to answer this question, answer N.
  1425. config ARCH_PROC_KCORE_TEXT
  1426. def_bool y
  1427. depends on X86_64 && PROC_KCORE
  1428. config ILLEGAL_POINTER_VALUE
  1429. hex
  1430. default 0 if X86_32
  1431. default 0xdead000000000000 if X86_64
  1432. config X86_PMEM_LEGACY_DEVICE
  1433. bool
  1434. config X86_PMEM_LEGACY
  1435. tristate "Support non-standard NVDIMMs and ADR protected memory"
  1436. depends on PHYS_ADDR_T_64BIT
  1437. depends on BLK_DEV
  1438. select X86_PMEM_LEGACY_DEVICE
  1439. select NUMA_KEEP_MEMINFO if NUMA
  1440. select LIBNVDIMM
  1441. help
  1442. Treat memory marked using the non-standard e820 type of 12 as used
  1443. by the Intel Sandy Bridge-EP reference BIOS as protected memory.
  1444. The kernel will offer these regions to the 'pmem' driver so
  1445. they can be used for persistent storage.
  1446. Say Y if unsure.
  1447. config HIGHPTE
  1448. bool "Allocate 3rd-level pagetables from highmem"
  1449. depends on HIGHMEM
  1450. help
  1451. The VM uses one page table entry for each page of physical memory.
  1452. For systems with a lot of RAM, this can be wasteful of precious
  1453. low memory. Setting this option will put user-space page table
  1454. entries in high memory.
  1455. config X86_CHECK_BIOS_CORRUPTION
  1456. bool "Check for low memory corruption"
  1457. help
  1458. Periodically check for memory corruption in low memory, which
  1459. is suspected to be caused by BIOS. Even when enabled in the
  1460. configuration, it is disabled at runtime. Enable it by
  1461. setting "memory_corruption_check=1" on the kernel command
  1462. line. By default it scans the low 64k of memory every 60
  1463. seconds; see the memory_corruption_check_size and
  1464. memory_corruption_check_period parameters in
  1465. Documentation/admin-guide/kernel-parameters.rst to adjust this.
  1466. When enabled with the default parameters, this option has
  1467. almost no overhead, as it reserves a relatively small amount
  1468. of memory and scans it infrequently. It both detects corruption
  1469. and prevents it from affecting the running system.
  1470. It is, however, intended as a diagnostic tool; if repeatable
  1471. BIOS-originated corruption always affects the same memory,
  1472. you can use memmap= to prevent the kernel from using that
  1473. memory.
  1474. config X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK
  1475. bool "Set the default setting of memory_corruption_check"
  1476. depends on X86_CHECK_BIOS_CORRUPTION
  1477. default y
  1478. help
  1479. Set whether the default state of memory_corruption_check is
  1480. on or off.
  1481. config MATH_EMULATION
  1482. bool
  1483. depends on MODIFY_LDT_SYSCALL
  1484. prompt "Math emulation" if X86_32 && (M486SX || MELAN)
  1485. help
  1486. Linux can emulate a math coprocessor (used for floating point
  1487. operations) if you don't have one. 486DX and Pentium processors have
  1488. a math coprocessor built in, 486SX and 386 do not, unless you added
  1489. a 487DX or 387, respectively. (The messages during boot time can
  1490. give you some hints here ["man dmesg"].) Everyone needs either a
  1491. coprocessor or this emulation.
  1492. If you don't have a math coprocessor, you need to say Y here; if you
  1493. say Y here even though you have a coprocessor, the coprocessor will
  1494. be used nevertheless. (This behavior can be changed with the kernel
  1495. command line option "no387", which comes handy if your coprocessor
  1496. is broken. Try "man bootparam" or see the documentation of your boot
  1497. loader (lilo or loadlin) about how to pass options to the kernel at
  1498. boot time.) This means that it is a good idea to say Y here if you
  1499. intend to use this kernel on different machines.
  1500. More information about the internals of the Linux math coprocessor
  1501. emulation can be found in <file:arch/x86/math-emu/README>.
  1502. If you are not sure, say Y; apart from resulting in a 66 KB bigger
  1503. kernel, it won't hurt.
  1504. config MTRR
  1505. def_bool y
  1506. prompt "MTRR (Memory Type Range Register) support" if EXPERT
  1507. help
  1508. On Intel P6 family processors (Pentium Pro, Pentium II and later)
  1509. the Memory Type Range Registers (MTRRs) may be used to control
  1510. processor access to memory ranges. This is most useful if you have
  1511. a video (VGA) card on a PCI or AGP bus. Enabling write-combining
  1512. allows bus write transfers to be combined into a larger transfer
  1513. before bursting over the PCI/AGP bus. This can increase performance
  1514. of image write operations 2.5 times or more. Saying Y here creates a
  1515. /proc/mtrr file which may be used to manipulate your processor's
  1516. MTRRs. Typically the X server should use this.
  1517. This code has a reasonably generic interface so that similar
  1518. control registers on other processors can be easily supported
  1519. as well:
  1520. The Cyrix 6x86, 6x86MX and M II processors have Address Range
  1521. Registers (ARRs) which provide a similar functionality to MTRRs. For
  1522. these, the ARRs are used to emulate the MTRRs.
  1523. The AMD K6-2 (stepping 8 and above) and K6-3 processors have two
  1524. MTRRs. The Centaur C6 (WinChip) has 8 MCRs, allowing
  1525. write-combining. All of these processors are supported by this code
  1526. and it makes sense to say Y here if you have one of them.
  1527. Saying Y here also fixes a problem with buggy SMP BIOSes which only
  1528. set the MTRRs for the boot CPU and not for the secondary CPUs. This
  1529. can lead to all sorts of problems, so it's good to say Y here.
  1530. You can safely say Y even if your machine doesn't have MTRRs, you'll
  1531. just add about 9 KB to your kernel.
  1532. See <file:Documentation/arch/x86/mtrr.rst> for more information.
  1533. config MTRR_SANITIZER
  1534. def_bool y
  1535. prompt "MTRR cleanup support"
  1536. depends on MTRR
  1537. help
  1538. Convert MTRR layout from continuous to discrete, so X drivers can
  1539. add writeback entries.
  1540. Can be disabled with disable_mtrr_cleanup on the kernel command line.
  1541. The largest mtrr entry size for a continuous block can be set with
  1542. mtrr_chunk_size.
  1543. If unsure, say Y.
  1544. config MTRR_SANITIZER_ENABLE_DEFAULT
  1545. int "MTRR cleanup enable value (0-1)"
  1546. range 0 1
  1547. default "0"
  1548. depends on MTRR_SANITIZER
  1549. help
  1550. Enable mtrr cleanup default value
  1551. config MTRR_SANITIZER_SPARE_REG_NR_DEFAULT
  1552. int "MTRR cleanup spare reg num (0-7)"
  1553. range 0 7
  1554. default "1"
  1555. depends on MTRR_SANITIZER
  1556. help
  1557. mtrr cleanup spare entries default, it can be changed via
  1558. mtrr_spare_reg_nr=N on the kernel command line.
  1559. config X86_PAT
  1560. def_bool y
  1561. prompt "x86 PAT support" if EXPERT
  1562. depends on MTRR
  1563. select ARCH_USES_PG_ARCH_2
  1564. help
  1565. Use PAT attributes to setup page level cache control.
  1566. PATs are the modern equivalents of MTRRs and are much more
  1567. flexible than MTRRs.
  1568. Say N here if you see bootup problems (boot crash, boot hang,
  1569. spontaneous reboots) or a non-working video driver.
  1570. If unsure, say Y.
  1571. config X86_UMIP
  1572. def_bool y
  1573. prompt "User Mode Instruction Prevention" if EXPERT
  1574. help
  1575. User Mode Instruction Prevention (UMIP) is a security feature in
  1576. some x86 processors. If enabled, a general protection fault is
  1577. issued if the SGDT, SLDT, SIDT, SMSW or STR instructions are
  1578. executed in user mode. These instructions unnecessarily expose
  1579. information about the hardware state.
  1580. The vast majority of applications do not use these instructions.
  1581. For the very few that do, software emulation is provided in
  1582. specific cases in protected and virtual-8086 modes. Emulated
  1583. results are dummy.
  1584. config CC_HAS_IBT
  1585. # GCC >= 9 and binutils >= 2.29
  1586. # Retpoline check to work around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93654
  1587. # Clang/LLVM >= 14
  1588. # https://github.com/llvm/llvm-project/commit/e0b89df2e0f0130881bf6c39bf31d7f6aac00e0f
  1589. # https://github.com/llvm/llvm-project/commit/dfcf69770bc522b9e411c66454934a37c1f35332
  1590. def_bool ((CC_IS_GCC && $(cc-option, -fcf-protection=branch -mindirect-branch-register)) || \
  1591. (CC_IS_CLANG && CLANG_VERSION >= 140000)) && \
  1592. $(as-instr,endbr64)
  1593. config X86_CET
  1594. def_bool n
  1595. help
  1596. CET features configured (Shadow stack or IBT)
  1597. config X86_KERNEL_IBT
  1598. prompt "Indirect Branch Tracking"
  1599. def_bool y
  1600. depends on X86_64 && CC_HAS_IBT && HAVE_OBJTOOL
  1601. # https://github.com/llvm/llvm-project/commit/9d7001eba9c4cb311e03cd8cdc231f9e579f2d0f
  1602. depends on !LD_IS_LLD || LLD_VERSION >= 140000
  1603. select OBJTOOL
  1604. select X86_CET
  1605. help
  1606. Build the kernel with support for Indirect Branch Tracking, a
  1607. hardware support course-grain forward-edge Control Flow Integrity
  1608. protection. It enforces that all indirect calls must land on
  1609. an ENDBR instruction, as such, the compiler will instrument the
  1610. code with them to make this happen.
  1611. In addition to building the kernel with IBT, seal all functions that
  1612. are not indirect call targets, avoiding them ever becoming one.
  1613. This requires LTO like objtool runs and will slow down the build. It
  1614. does significantly reduce the number of ENDBR instructions in the
  1615. kernel image.
  1616. config X86_INTEL_MEMORY_PROTECTION_KEYS
  1617. prompt "Memory Protection Keys"
  1618. def_bool y
  1619. # Note: only available in 64-bit mode
  1620. depends on X86_64 && (CPU_SUP_INTEL || CPU_SUP_AMD)
  1621. select ARCH_USES_HIGH_VMA_FLAGS
  1622. select ARCH_HAS_PKEYS
  1623. help
  1624. Memory Protection Keys provides a mechanism for enforcing
  1625. page-based protections, but without requiring modification of the
  1626. page tables when an application changes protection domains.
  1627. For details, see Documentation/core-api/protection-keys.rst
  1628. If unsure, say y.
  1629. config ARCH_PKEY_BITS
  1630. int
  1631. default 4
  1632. choice
  1633. prompt "TSX enable mode"
  1634. depends on CPU_SUP_INTEL
  1635. default X86_INTEL_TSX_MODE_OFF
  1636. help
  1637. Intel's TSX (Transactional Synchronization Extensions) feature
  1638. allows to optimize locking protocols through lock elision which
  1639. can lead to a noticeable performance boost.
  1640. On the other hand it has been shown that TSX can be exploited
  1641. to form side channel attacks (e.g. TAA) and chances are there
  1642. will be more of those attacks discovered in the future.
  1643. Therefore TSX is not enabled by default (aka tsx=off). An admin
  1644. might override this decision by tsx=on the command line parameter.
  1645. Even with TSX enabled, the kernel will attempt to enable the best
  1646. possible TAA mitigation setting depending on the microcode available
  1647. for the particular machine.
  1648. This option allows to set the default tsx mode between tsx=on, =off
  1649. and =auto. See Documentation/admin-guide/kernel-parameters.txt for more
  1650. details.
  1651. Say off if not sure, auto if TSX is in use but it should be used on safe
  1652. platforms or on if TSX is in use and the security aspect of tsx is not
  1653. relevant.
  1654. config X86_INTEL_TSX_MODE_OFF
  1655. bool "off"
  1656. help
  1657. TSX is disabled if possible - equals to tsx=off command line parameter.
  1658. config X86_INTEL_TSX_MODE_ON
  1659. bool "on"
  1660. help
  1661. TSX is always enabled on TSX capable HW - equals the tsx=on command
  1662. line parameter.
  1663. config X86_INTEL_TSX_MODE_AUTO
  1664. bool "auto"
  1665. help
  1666. TSX is enabled on TSX capable HW that is believed to be safe against
  1667. side channel attacks- equals the tsx=auto command line parameter.
  1668. endchoice
  1669. config X86_SGX
  1670. bool "Software Guard eXtensions (SGX)"
  1671. depends on X86_64 && CPU_SUP_INTEL && X86_X2APIC
  1672. depends on CRYPTO=y
  1673. depends on CRYPTO_SHA256=y
  1674. select MMU_NOTIFIER
  1675. select NUMA_KEEP_MEMINFO if NUMA
  1676. select XARRAY_MULTI
  1677. help
  1678. Intel(R) Software Guard eXtensions (SGX) is a set of CPU instructions
  1679. that can be used by applications to set aside private regions of code
  1680. and data, referred to as enclaves. An enclave's private memory can
  1681. only be accessed by code running within the enclave. Accesses from
  1682. outside the enclave, including other enclaves, are disallowed by
  1683. hardware.
  1684. If unsure, say N.
  1685. config X86_USER_SHADOW_STACK
  1686. bool "X86 userspace shadow stack"
  1687. depends on AS_WRUSS
  1688. depends on X86_64
  1689. select ARCH_USES_HIGH_VMA_FLAGS
  1690. select X86_CET
  1691. help
  1692. Shadow stack protection is a hardware feature that detects function
  1693. return address corruption. This helps mitigate ROP attacks.
  1694. Applications must be enabled to use it, and old userspace does not
  1695. get protection "for free".
  1696. CPUs supporting shadow stacks were first released in 2020.
  1697. See Documentation/arch/x86/shstk.rst for more information.
  1698. If unsure, say N.
  1699. config INTEL_TDX_HOST
  1700. bool "Intel Trust Domain Extensions (TDX) host support"
  1701. depends on CPU_SUP_INTEL
  1702. depends on X86_64
  1703. depends on KVM_INTEL
  1704. depends on X86_X2APIC
  1705. select ARCH_KEEP_MEMBLOCK
  1706. depends on CONTIG_ALLOC
  1707. depends on !KEXEC_CORE
  1708. depends on X86_MCE
  1709. help
  1710. Intel Trust Domain Extensions (TDX) protects guest VMs from malicious
  1711. host and certain physical attacks. This option enables necessary TDX
  1712. support in the host kernel to run confidential VMs.
  1713. If unsure, say N.
  1714. config EFI
  1715. bool "EFI runtime service support"
  1716. depends on ACPI
  1717. select UCS2_STRING
  1718. select EFI_RUNTIME_WRAPPERS
  1719. select ARCH_USE_MEMREMAP_PROT
  1720. select EFI_RUNTIME_MAP if KEXEC_CORE
  1721. help
  1722. This enables the kernel to use EFI runtime services that are
  1723. available (such as the EFI variable services).
  1724. This option is only useful on systems that have EFI firmware.
  1725. In addition, you should use the latest ELILO loader available
  1726. at <http://elilo.sourceforge.net> in order to take advantage
  1727. of EFI runtime services. However, even with this option, the
  1728. resultant kernel should continue to boot on existing non-EFI
  1729. platforms.
  1730. config EFI_STUB
  1731. bool "EFI stub support"
  1732. depends on EFI
  1733. select RELOCATABLE
  1734. help
  1735. This kernel feature allows a bzImage to be loaded directly
  1736. by EFI firmware without the use of a bootloader.
  1737. See Documentation/admin-guide/efi-stub.rst for more information.
  1738. config EFI_HANDOVER_PROTOCOL
  1739. bool "EFI handover protocol (DEPRECATED)"
  1740. depends on EFI_STUB
  1741. default y
  1742. help
  1743. Select this in order to include support for the deprecated EFI
  1744. handover protocol, which defines alternative entry points into the
  1745. EFI stub. This is a practice that has no basis in the UEFI
  1746. specification, and requires a priori knowledge on the part of the
  1747. bootloader about Linux/x86 specific ways of passing the command line
  1748. and initrd, and where in memory those assets may be loaded.
  1749. If in doubt, say Y. Even though the corresponding support is not
  1750. present in upstream GRUB or other bootloaders, most distros build
  1751. GRUB with numerous downstream patches applied, and may rely on the
  1752. handover protocol as as result.
  1753. config EFI_MIXED
  1754. bool "EFI mixed-mode support"
  1755. depends on EFI_STUB && X86_64
  1756. help
  1757. Enabling this feature allows a 64-bit kernel to be booted
  1758. on a 32-bit firmware, provided that your CPU supports 64-bit
  1759. mode.
  1760. Note that it is not possible to boot a mixed-mode enabled
  1761. kernel via the EFI boot stub - a bootloader that supports
  1762. the EFI handover protocol must be used.
  1763. If unsure, say N.
  1764. config EFI_RUNTIME_MAP
  1765. bool "Export EFI runtime maps to sysfs" if EXPERT
  1766. depends on EFI
  1767. help
  1768. Export EFI runtime memory regions to /sys/firmware/efi/runtime-map.
  1769. That memory map is required by the 2nd kernel to set up EFI virtual
  1770. mappings after kexec, but can also be used for debugging purposes.
  1771. See also Documentation/ABI/testing/sysfs-firmware-efi-runtime-map.
  1772. source "kernel/Kconfig.hz"
  1773. config ARCH_SUPPORTS_KEXEC
  1774. def_bool y
  1775. config ARCH_SUPPORTS_KEXEC_FILE
  1776. def_bool X86_64
  1777. config ARCH_SELECTS_KEXEC_FILE
  1778. def_bool y
  1779. depends on KEXEC_FILE
  1780. select HAVE_IMA_KEXEC if IMA
  1781. config ARCH_SUPPORTS_KEXEC_PURGATORY
  1782. def_bool y
  1783. config ARCH_SUPPORTS_KEXEC_SIG
  1784. def_bool y
  1785. config ARCH_SUPPORTS_KEXEC_SIG_FORCE
  1786. def_bool y
  1787. config ARCH_SUPPORTS_KEXEC_BZIMAGE_VERIFY_SIG
  1788. def_bool y
  1789. config ARCH_SUPPORTS_KEXEC_JUMP
  1790. def_bool y
  1791. config ARCH_SUPPORTS_CRASH_DUMP
  1792. def_bool X86_64 || (X86_32 && HIGHMEM)
  1793. config ARCH_DEFAULT_CRASH_DUMP
  1794. def_bool y
  1795. config ARCH_SUPPORTS_CRASH_HOTPLUG
  1796. def_bool y
  1797. config ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION
  1798. def_bool CRASH_RESERVE
  1799. config PHYSICAL_START
  1800. hex "Physical address where the kernel is loaded" if (EXPERT || CRASH_DUMP)
  1801. default "0x1000000"
  1802. help
  1803. This gives the physical address where the kernel is loaded.
  1804. If the kernel is not relocatable (CONFIG_RELOCATABLE=n) then bzImage
  1805. will decompress itself to above physical address and run from there.
  1806. Otherwise, bzImage will run from the address where it has been loaded
  1807. by the boot loader. The only exception is if it is loaded below the
  1808. above physical address, in which case it will relocate itself there.
  1809. In normal kdump cases one does not have to set/change this option
  1810. as now bzImage can be compiled as a completely relocatable image
  1811. (CONFIG_RELOCATABLE=y) and be used to load and run from a different
  1812. address. This option is mainly useful for the folks who don't want
  1813. to use a bzImage for capturing the crash dump and want to use a
  1814. vmlinux instead. vmlinux is not relocatable hence a kernel needs
  1815. to be specifically compiled to run from a specific memory area
  1816. (normally a reserved region) and this option comes handy.
  1817. So if you are using bzImage for capturing the crash dump,
  1818. leave the value here unchanged to 0x1000000 and set
  1819. CONFIG_RELOCATABLE=y. Otherwise if you plan to use vmlinux
  1820. for capturing the crash dump change this value to start of
  1821. the reserved region. In other words, it can be set based on
  1822. the "X" value as specified in the "crashkernel=YM@XM"
  1823. command line boot parameter passed to the panic-ed
  1824. kernel. Please take a look at Documentation/admin-guide/kdump/kdump.rst
  1825. for more details about crash dumps.
  1826. Usage of bzImage for capturing the crash dump is recommended as
  1827. one does not have to build two kernels. Same kernel can be used
  1828. as production kernel and capture kernel. Above option should have
  1829. gone away after relocatable bzImage support is introduced. But it
  1830. is present because there are users out there who continue to use
  1831. vmlinux for dump capture. This option should go away down the
  1832. line.
  1833. Don't change this unless you know what you are doing.
  1834. config RELOCATABLE
  1835. bool "Build a relocatable kernel"
  1836. default y
  1837. help
  1838. This builds a kernel image that retains relocation information
  1839. so it can be loaded someplace besides the default 1MB.
  1840. The relocations tend to make the kernel binary about 10% larger,
  1841. but are discarded at runtime.
  1842. One use is for the kexec on panic case where the recovery kernel
  1843. must live at a different physical address than the primary
  1844. kernel.
  1845. Note: If CONFIG_RELOCATABLE=y, then the kernel runs from the address
  1846. it has been loaded at and the compile time physical address
  1847. (CONFIG_PHYSICAL_START) is used as the minimum location.
  1848. config RANDOMIZE_BASE
  1849. bool "Randomize the address of the kernel image (KASLR)"
  1850. depends on RELOCATABLE
  1851. default y
  1852. help
  1853. In support of Kernel Address Space Layout Randomization (KASLR),
  1854. this randomizes the physical address at which the kernel image
  1855. is decompressed and the virtual address where the kernel
  1856. image is mapped, as a security feature that deters exploit
  1857. attempts relying on knowledge of the location of kernel
  1858. code internals.
  1859. On 64-bit, the kernel physical and virtual addresses are
  1860. randomized separately. The physical address will be anywhere
  1861. between 16MB and the top of physical memory (up to 64TB). The
  1862. virtual address will be randomized from 16MB up to 1GB (9 bits
  1863. of entropy). Note that this also reduces the memory space
  1864. available to kernel modules from 1.5GB to 1GB.
  1865. On 32-bit, the kernel physical and virtual addresses are
  1866. randomized together. They will be randomized from 16MB up to
  1867. 512MB (8 bits of entropy).
  1868. Entropy is generated using the RDRAND instruction if it is
  1869. supported. If RDTSC is supported, its value is mixed into
  1870. the entropy pool as well. If neither RDRAND nor RDTSC are
  1871. supported, then entropy is read from the i8254 timer. The
  1872. usable entropy is limited by the kernel being built using
  1873. 2GB addressing, and that PHYSICAL_ALIGN must be at a
  1874. minimum of 2MB. As a result, only 10 bits of entropy are
  1875. theoretically possible, but the implementations are further
  1876. limited due to memory layouts.
  1877. If unsure, say Y.
  1878. # Relocation on x86 needs some additional build support
  1879. config X86_NEED_RELOCS
  1880. def_bool y
  1881. depends on RANDOMIZE_BASE || (X86_32 && RELOCATABLE)
  1882. config PHYSICAL_ALIGN
  1883. hex "Alignment value to which kernel should be aligned"
  1884. default "0x200000"
  1885. range 0x2000 0x1000000 if X86_32
  1886. range 0x200000 0x1000000 if X86_64
  1887. help
  1888. This value puts the alignment restrictions on physical address
  1889. where kernel is loaded and run from. Kernel is compiled for an
  1890. address which meets above alignment restriction.
  1891. If bootloader loads the kernel at a non-aligned address and
  1892. CONFIG_RELOCATABLE is set, kernel will move itself to nearest
  1893. address aligned to above value and run from there.
  1894. If bootloader loads the kernel at a non-aligned address and
  1895. CONFIG_RELOCATABLE is not set, kernel will ignore the run time
  1896. load address and decompress itself to the address it has been
  1897. compiled for and run from there. The address for which kernel is
  1898. compiled already meets above alignment restrictions. Hence the
  1899. end result is that kernel runs from a physical address meeting
  1900. above alignment restrictions.
  1901. On 32-bit this value must be a multiple of 0x2000. On 64-bit
  1902. this value must be a multiple of 0x200000.
  1903. Don't change this unless you know what you are doing.
  1904. config DYNAMIC_MEMORY_LAYOUT
  1905. bool
  1906. help
  1907. This option makes base addresses of vmalloc and vmemmap as well as
  1908. __PAGE_OFFSET movable during boot.
  1909. config RANDOMIZE_MEMORY
  1910. bool "Randomize the kernel memory sections"
  1911. depends on X86_64
  1912. depends on RANDOMIZE_BASE
  1913. select DYNAMIC_MEMORY_LAYOUT
  1914. default RANDOMIZE_BASE
  1915. help
  1916. Randomizes the base virtual address of kernel memory sections
  1917. (physical memory mapping, vmalloc & vmemmap). This security feature
  1918. makes exploits relying on predictable memory locations less reliable.
  1919. The order of allocations remains unchanged. Entropy is generated in
  1920. the same way as RANDOMIZE_BASE. Current implementation in the optimal
  1921. configuration have in average 30,000 different possible virtual
  1922. addresses for each memory section.
  1923. If unsure, say Y.
  1924. config RANDOMIZE_MEMORY_PHYSICAL_PADDING
  1925. hex "Physical memory mapping padding" if EXPERT
  1926. depends on RANDOMIZE_MEMORY
  1927. default "0xa" if MEMORY_HOTPLUG
  1928. default "0x0"
  1929. range 0x1 0x40 if MEMORY_HOTPLUG
  1930. range 0x0 0x40
  1931. help
  1932. Define the padding in terabytes added to the existing physical
  1933. memory size during kernel memory randomization. It is useful
  1934. for memory hotplug support but reduces the entropy available for
  1935. address randomization.
  1936. If unsure, leave at the default value.
  1937. config ADDRESS_MASKING
  1938. bool "Linear Address Masking support"
  1939. depends on X86_64
  1940. depends on COMPILE_TEST || !CPU_MITIGATIONS # wait for LASS
  1941. help
  1942. Linear Address Masking (LAM) modifies the checking that is applied
  1943. to 64-bit linear addresses, allowing software to use of the
  1944. untranslated address bits for metadata.
  1945. The capability can be used for efficient address sanitizers (ASAN)
  1946. implementation and for optimizations in JITs.
  1947. config HOTPLUG_CPU
  1948. def_bool y
  1949. depends on SMP
  1950. config COMPAT_VDSO
  1951. def_bool n
  1952. prompt "Disable the 32-bit vDSO (needed for glibc 2.3.3)"
  1953. depends on COMPAT_32
  1954. help
  1955. Certain buggy versions of glibc will crash if they are
  1956. presented with a 32-bit vDSO that is not mapped at the address
  1957. indicated in its segment table.
  1958. The bug was introduced by f866314b89d56845f55e6f365e18b31ec978ec3a
  1959. and fixed by 3b3ddb4f7db98ec9e912ccdf54d35df4aa30e04a and
  1960. 49ad572a70b8aeb91e57483a11dd1b77e31c4468. Glibc 2.3.3 is
  1961. the only released version with the bug, but OpenSUSE 9
  1962. contains a buggy "glibc 2.3.2".
  1963. The symptom of the bug is that everything crashes on startup, saying:
  1964. dl_main: Assertion `(void *) ph->p_vaddr == _rtld_local._dl_sysinfo_dso' failed!
  1965. Saying Y here changes the default value of the vdso32 boot
  1966. option from 1 to 0, which turns off the 32-bit vDSO entirely.
  1967. This works around the glibc bug but hurts performance.
  1968. If unsure, say N: if you are compiling your own kernel, you
  1969. are unlikely to be using a buggy version of glibc.
  1970. choice
  1971. prompt "vsyscall table for legacy applications"
  1972. depends on X86_64
  1973. default LEGACY_VSYSCALL_XONLY
  1974. help
  1975. Legacy user code that does not know how to find the vDSO expects
  1976. to be able to issue three syscalls by calling fixed addresses in
  1977. kernel space. Since this location is not randomized with ASLR,
  1978. it can be used to assist security vulnerability exploitation.
  1979. This setting can be changed at boot time via the kernel command
  1980. line parameter vsyscall=[emulate|xonly|none]. Emulate mode
  1981. is deprecated and can only be enabled using the kernel command
  1982. line.
  1983. On a system with recent enough glibc (2.14 or newer) and no
  1984. static binaries, you can say None without a performance penalty
  1985. to improve security.
  1986. If unsure, select "Emulate execution only".
  1987. config LEGACY_VSYSCALL_XONLY
  1988. bool "Emulate execution only"
  1989. help
  1990. The kernel traps and emulates calls into the fixed vsyscall
  1991. address mapping and does not allow reads. This
  1992. configuration is recommended when userspace might use the
  1993. legacy vsyscall area but support for legacy binary
  1994. instrumentation of legacy code is not needed. It mitigates
  1995. certain uses of the vsyscall area as an ASLR-bypassing
  1996. buffer.
  1997. config LEGACY_VSYSCALL_NONE
  1998. bool "None"
  1999. help
  2000. There will be no vsyscall mapping at all. This will
  2001. eliminate any risk of ASLR bypass due to the vsyscall
  2002. fixed address mapping. Attempts to use the vsyscalls
  2003. will be reported to dmesg, so that either old or
  2004. malicious userspace programs can be identified.
  2005. endchoice
  2006. config CMDLINE_BOOL
  2007. bool "Built-in kernel command line"
  2008. help
  2009. Allow for specifying boot arguments to the kernel at
  2010. build time. On some systems (e.g. embedded ones), it is
  2011. necessary or convenient to provide some or all of the
  2012. kernel boot arguments with the kernel itself (that is,
  2013. to not rely on the boot loader to provide them.)
  2014. To compile command line arguments into the kernel,
  2015. set this option to 'Y', then fill in the
  2016. boot arguments in CONFIG_CMDLINE.
  2017. Systems with fully functional boot loaders (i.e. non-embedded)
  2018. should leave this option set to 'N'.
  2019. config CMDLINE
  2020. string "Built-in kernel command string"
  2021. depends on CMDLINE_BOOL
  2022. default ""
  2023. help
  2024. Enter arguments here that should be compiled into the kernel
  2025. image and used at boot time. If the boot loader provides a
  2026. command line at boot time, it is appended to this string to
  2027. form the full kernel command line, when the system boots.
  2028. However, you can use the CONFIG_CMDLINE_OVERRIDE option to
  2029. change this behavior.
  2030. In most cases, the command line (whether built-in or provided
  2031. by the boot loader) should specify the device for the root
  2032. file system.
  2033. config CMDLINE_OVERRIDE
  2034. bool "Built-in command line overrides boot loader arguments"
  2035. depends on CMDLINE_BOOL && CMDLINE != ""
  2036. help
  2037. Set this option to 'Y' to have the kernel ignore the boot loader
  2038. command line, and use ONLY the built-in command line.
  2039. This is used to work around broken boot loaders. This should
  2040. be set to 'N' under normal conditions.
  2041. config MODIFY_LDT_SYSCALL
  2042. bool "Enable the LDT (local descriptor table)" if EXPERT
  2043. default y
  2044. help
  2045. Linux can allow user programs to install a per-process x86
  2046. Local Descriptor Table (LDT) using the modify_ldt(2) system
  2047. call. This is required to run 16-bit or segmented code such as
  2048. DOSEMU or some Wine programs. It is also used by some very old
  2049. threading libraries.
  2050. Enabling this feature adds a small amount of overhead to
  2051. context switches and increases the low-level kernel attack
  2052. surface. Disabling it removes the modify_ldt(2) system call.
  2053. Saying 'N' here may make sense for embedded or server kernels.
  2054. config STRICT_SIGALTSTACK_SIZE
  2055. bool "Enforce strict size checking for sigaltstack"
  2056. depends on DYNAMIC_SIGFRAME
  2057. help
  2058. For historical reasons MINSIGSTKSZ is a constant which became
  2059. already too small with AVX512 support. Add a mechanism to
  2060. enforce strict checking of the sigaltstack size against the
  2061. real size of the FPU frame. This option enables the check
  2062. by default. It can also be controlled via the kernel command
  2063. line option 'strict_sas_size' independent of this config
  2064. switch. Enabling it might break existing applications which
  2065. allocate a too small sigaltstack but 'work' because they
  2066. never get a signal delivered.
  2067. Say 'N' unless you want to really enforce this check.
  2068. config CFI_AUTO_DEFAULT
  2069. bool "Attempt to use FineIBT by default at boot time"
  2070. depends on FINEIBT
  2071. depends on !RUST || RUSTC_VERSION >= 108800
  2072. default y
  2073. help
  2074. Attempt to use FineIBT by default at boot time. If enabled,
  2075. this is the same as booting with "cfi=auto". If disabled,
  2076. this is the same as booting with "cfi=kcfi".
  2077. source "kernel/livepatch/Kconfig"
  2078. endmenu
  2079. config CC_HAS_NAMED_AS
  2080. def_bool $(success,echo 'int __seg_fs fs; int __seg_gs gs;' | $(CC) -x c - -S -o /dev/null)
  2081. depends on CC_IS_GCC
  2082. #
  2083. # -fsanitize=kernel-address (KASAN) and -fsanitize=thread (KCSAN)
  2084. # are incompatible with named address spaces with GCC < 13.3
  2085. # (see GCC PR sanitizer/111736 and also PR sanitizer/115172).
  2086. #
  2087. config CC_HAS_NAMED_AS_FIXED_SANITIZERS
  2088. def_bool y
  2089. depends on !(KASAN || KCSAN) || GCC_VERSION >= 130300
  2090. depends on !(UBSAN_BOOL && KASAN) || GCC_VERSION >= 140200
  2091. config USE_X86_SEG_SUPPORT
  2092. def_bool CC_HAS_NAMED_AS
  2093. depends on CC_HAS_NAMED_AS_FIXED_SANITIZERS
  2094. config CC_HAS_SLS
  2095. def_bool $(cc-option,-mharden-sls=all)
  2096. config CC_HAS_RETURN_THUNK
  2097. def_bool $(cc-option,-mfunction-return=thunk-extern)
  2098. config CC_HAS_ENTRY_PADDING
  2099. def_bool $(cc-option,-fpatchable-function-entry=16,16)
  2100. config FUNCTION_PADDING_CFI
  2101. int
  2102. default 59 if FUNCTION_ALIGNMENT_64B
  2103. default 27 if FUNCTION_ALIGNMENT_32B
  2104. default 11 if FUNCTION_ALIGNMENT_16B
  2105. default 3 if FUNCTION_ALIGNMENT_8B
  2106. default 0
  2107. # Basically: FUNCTION_ALIGNMENT - 5*CFI_CLANG
  2108. # except Kconfig can't do arithmetic :/
  2109. config FUNCTION_PADDING_BYTES
  2110. int
  2111. default FUNCTION_PADDING_CFI if CFI_CLANG
  2112. default FUNCTION_ALIGNMENT
  2113. config CALL_PADDING
  2114. def_bool n
  2115. depends on CC_HAS_ENTRY_PADDING && OBJTOOL
  2116. select FUNCTION_ALIGNMENT_16B
  2117. config FINEIBT
  2118. def_bool y
  2119. depends on X86_KERNEL_IBT && CFI_CLANG && MITIGATION_RETPOLINE
  2120. select CALL_PADDING
  2121. config HAVE_CALL_THUNKS
  2122. def_bool y
  2123. depends on CC_HAS_ENTRY_PADDING && MITIGATION_RETHUNK && OBJTOOL
  2124. config CALL_THUNKS
  2125. def_bool n
  2126. select CALL_PADDING
  2127. config PREFIX_SYMBOLS
  2128. def_bool y
  2129. depends on CALL_PADDING && !CFI_CLANG
  2130. menuconfig CPU_MITIGATIONS
  2131. bool "Mitigations for CPU vulnerabilities"
  2132. default y
  2133. help
  2134. Say Y here to enable options which enable mitigations for hardware
  2135. vulnerabilities (usually related to speculative execution).
  2136. Mitigations can be disabled or restricted to SMT systems at runtime
  2137. via the "mitigations" kernel parameter.
  2138. If you say N, all mitigations will be disabled. This CANNOT be
  2139. overridden at runtime.
  2140. Say 'Y', unless you really know what you are doing.
  2141. if CPU_MITIGATIONS
  2142. config MITIGATION_PAGE_TABLE_ISOLATION
  2143. bool "Remove the kernel mapping in user mode"
  2144. default y
  2145. depends on (X86_64 || X86_PAE)
  2146. help
  2147. This feature reduces the number of hardware side channels by
  2148. ensuring that the majority of kernel addresses are not mapped
  2149. into userspace.
  2150. See Documentation/arch/x86/pti.rst for more details.
  2151. config MITIGATION_RETPOLINE
  2152. bool "Avoid speculative indirect branches in kernel"
  2153. select OBJTOOL if HAVE_OBJTOOL
  2154. default y
  2155. help
  2156. Compile kernel with the retpoline compiler options to guard against
  2157. kernel-to-user data leaks by avoiding speculative indirect
  2158. branches. Requires a compiler with -mindirect-branch=thunk-extern
  2159. support for full protection. The kernel may run slower.
  2160. config MITIGATION_RETHUNK
  2161. bool "Enable return-thunks"
  2162. depends on MITIGATION_RETPOLINE && CC_HAS_RETURN_THUNK
  2163. select OBJTOOL if HAVE_OBJTOOL
  2164. default y if X86_64
  2165. help
  2166. Compile the kernel with the return-thunks compiler option to guard
  2167. against kernel-to-user data leaks by avoiding return speculation.
  2168. Requires a compiler with -mfunction-return=thunk-extern
  2169. support for full protection. The kernel may run slower.
  2170. config MITIGATION_UNRET_ENTRY
  2171. bool "Enable UNRET on kernel entry"
  2172. depends on CPU_SUP_AMD && MITIGATION_RETHUNK && X86_64
  2173. default y
  2174. help
  2175. Compile the kernel with support for the retbleed=unret mitigation.
  2176. config MITIGATION_CALL_DEPTH_TRACKING
  2177. bool "Mitigate RSB underflow with call depth tracking"
  2178. depends on CPU_SUP_INTEL && HAVE_CALL_THUNKS
  2179. select HAVE_DYNAMIC_FTRACE_NO_PATCHABLE
  2180. select CALL_THUNKS
  2181. default y
  2182. help
  2183. Compile the kernel with call depth tracking to mitigate the Intel
  2184. SKL Return-Speculation-Buffer (RSB) underflow issue. The
  2185. mitigation is off by default and needs to be enabled on the
  2186. kernel command line via the retbleed=stuff option. For
  2187. non-affected systems the overhead of this option is marginal as
  2188. the call depth tracking is using run-time generated call thunks
  2189. in a compiler generated padding area and call patching. This
  2190. increases text size by ~5%. For non affected systems this space
  2191. is unused. On affected SKL systems this results in a significant
  2192. performance gain over the IBRS mitigation.
  2193. config CALL_THUNKS_DEBUG
  2194. bool "Enable call thunks and call depth tracking debugging"
  2195. depends on MITIGATION_CALL_DEPTH_TRACKING
  2196. select FUNCTION_ALIGNMENT_32B
  2197. default n
  2198. help
  2199. Enable call/ret counters for imbalance detection and build in
  2200. a noisy dmesg about callthunks generation and call patching for
  2201. trouble shooting. The debug prints need to be enabled on the
  2202. kernel command line with 'debug-callthunks'.
  2203. Only enable this when you are debugging call thunks as this
  2204. creates a noticeable runtime overhead. If unsure say N.
  2205. config MITIGATION_IBPB_ENTRY
  2206. bool "Enable IBPB on kernel entry"
  2207. depends on CPU_SUP_AMD && X86_64
  2208. default y
  2209. help
  2210. Compile the kernel with support for the retbleed=ibpb and
  2211. spec_rstack_overflow={ibpb,ibpb-vmexit} mitigations.
  2212. config MITIGATION_IBRS_ENTRY
  2213. bool "Enable IBRS on kernel entry"
  2214. depends on CPU_SUP_INTEL && X86_64
  2215. default y
  2216. help
  2217. Compile the kernel with support for the spectre_v2=ibrs mitigation.
  2218. This mitigates both spectre_v2 and retbleed at great cost to
  2219. performance.
  2220. config MITIGATION_SRSO
  2221. bool "Mitigate speculative RAS overflow on AMD"
  2222. depends on CPU_SUP_AMD && X86_64 && MITIGATION_RETHUNK
  2223. default y
  2224. help
  2225. Enable the SRSO mitigation needed on AMD Zen1-4 machines.
  2226. config MITIGATION_SLS
  2227. bool "Mitigate Straight-Line-Speculation"
  2228. depends on CC_HAS_SLS && X86_64
  2229. select OBJTOOL if HAVE_OBJTOOL
  2230. default n
  2231. help
  2232. Compile the kernel with straight-line-speculation options to guard
  2233. against straight line speculation. The kernel image might be slightly
  2234. larger.
  2235. config MITIGATION_GDS
  2236. bool "Mitigate Gather Data Sampling"
  2237. depends on CPU_SUP_INTEL
  2238. default y
  2239. help
  2240. Enable mitigation for Gather Data Sampling (GDS). GDS is a hardware
  2241. vulnerability which allows unprivileged speculative access to data
  2242. which was previously stored in vector registers. The attacker uses gather
  2243. instructions to infer the stale vector register data.
  2244. config MITIGATION_RFDS
  2245. bool "RFDS Mitigation"
  2246. depends on CPU_SUP_INTEL
  2247. default y
  2248. help
  2249. Enable mitigation for Register File Data Sampling (RFDS) by default.
  2250. RFDS is a hardware vulnerability which affects Intel Atom CPUs. It
  2251. allows unprivileged speculative access to stale data previously
  2252. stored in floating point, vector and integer registers.
  2253. See also <file:Documentation/admin-guide/hw-vuln/reg-file-data-sampling.rst>
  2254. config MITIGATION_SPECTRE_BHI
  2255. bool "Mitigate Spectre-BHB (Branch History Injection)"
  2256. depends on CPU_SUP_INTEL
  2257. default y
  2258. help
  2259. Enable BHI mitigations. BHI attacks are a form of Spectre V2 attacks
  2260. where the branch history buffer is poisoned to speculatively steer
  2261. indirect branches.
  2262. See <file:Documentation/admin-guide/hw-vuln/spectre.rst>
  2263. config MITIGATION_MDS
  2264. bool "Mitigate Microarchitectural Data Sampling (MDS) hardware bug"
  2265. depends on CPU_SUP_INTEL
  2266. default y
  2267. help
  2268. Enable mitigation for Microarchitectural Data Sampling (MDS). MDS is
  2269. a hardware vulnerability which allows unprivileged speculative access
  2270. to data which is available in various CPU internal buffers.
  2271. See also <file:Documentation/admin-guide/hw-vuln/mds.rst>
  2272. config MITIGATION_TAA
  2273. bool "Mitigate TSX Asynchronous Abort (TAA) hardware bug"
  2274. depends on CPU_SUP_INTEL
  2275. default y
  2276. help
  2277. Enable mitigation for TSX Asynchronous Abort (TAA). TAA is a hardware
  2278. vulnerability that allows unprivileged speculative access to data
  2279. which is available in various CPU internal buffers by using
  2280. asynchronous aborts within an Intel TSX transactional region.
  2281. See also <file:Documentation/admin-guide/hw-vuln/tsx_async_abort.rst>
  2282. config MITIGATION_MMIO_STALE_DATA
  2283. bool "Mitigate MMIO Stale Data hardware bug"
  2284. depends on CPU_SUP_INTEL
  2285. default y
  2286. help
  2287. Enable mitigation for MMIO Stale Data hardware bugs. Processor MMIO
  2288. Stale Data Vulnerabilities are a class of memory-mapped I/O (MMIO)
  2289. vulnerabilities that can expose data. The vulnerabilities require the
  2290. attacker to have access to MMIO.
  2291. See also
  2292. <file:Documentation/admin-guide/hw-vuln/processor_mmio_stale_data.rst>
  2293. config MITIGATION_L1TF
  2294. bool "Mitigate L1 Terminal Fault (L1TF) hardware bug"
  2295. depends on CPU_SUP_INTEL
  2296. default y
  2297. help
  2298. Mitigate L1 Terminal Fault (L1TF) hardware bug. L1 Terminal Fault is a
  2299. hardware vulnerability which allows unprivileged speculative access to data
  2300. available in the Level 1 Data Cache.
  2301. See <file:Documentation/admin-guide/hw-vuln/l1tf.rst
  2302. config MITIGATION_RETBLEED
  2303. bool "Mitigate RETBleed hardware bug"
  2304. depends on (CPU_SUP_INTEL && MITIGATION_SPECTRE_V2) || MITIGATION_UNRET_ENTRY || MITIGATION_IBPB_ENTRY
  2305. default y
  2306. help
  2307. Enable mitigation for RETBleed (Arbitrary Speculative Code Execution
  2308. with Return Instructions) vulnerability. RETBleed is a speculative
  2309. execution attack which takes advantage of microarchitectural behavior
  2310. in many modern microprocessors, similar to Spectre v2. An
  2311. unprivileged attacker can use these flaws to bypass conventional
  2312. memory security restrictions to gain read access to privileged memory
  2313. that would otherwise be inaccessible.
  2314. config MITIGATION_SPECTRE_V1
  2315. bool "Mitigate SPECTRE V1 hardware bug"
  2316. default y
  2317. help
  2318. Enable mitigation for Spectre V1 (Bounds Check Bypass). Spectre V1 is a
  2319. class of side channel attacks that takes advantage of speculative
  2320. execution that bypasses conditional branch instructions used for
  2321. memory access bounds check.
  2322. See also <file:Documentation/admin-guide/hw-vuln/spectre.rst>
  2323. config MITIGATION_SPECTRE_V2
  2324. bool "Mitigate SPECTRE V2 hardware bug"
  2325. default y
  2326. help
  2327. Enable mitigation for Spectre V2 (Branch Target Injection). Spectre
  2328. V2 is a class of side channel attacks that takes advantage of
  2329. indirect branch predictors inside the processor. In Spectre variant 2
  2330. attacks, the attacker can steer speculative indirect branches in the
  2331. victim to gadget code by poisoning the branch target buffer of a CPU
  2332. used for predicting indirect branch addresses.
  2333. See also <file:Documentation/admin-guide/hw-vuln/spectre.rst>
  2334. config MITIGATION_SRBDS
  2335. bool "Mitigate Special Register Buffer Data Sampling (SRBDS) hardware bug"
  2336. depends on CPU_SUP_INTEL
  2337. default y
  2338. help
  2339. Enable mitigation for Special Register Buffer Data Sampling (SRBDS).
  2340. SRBDS is a hardware vulnerability that allows Microarchitectural Data
  2341. Sampling (MDS) techniques to infer values returned from special
  2342. register accesses. An unprivileged user can extract values returned
  2343. from RDRAND and RDSEED executed on another core or sibling thread
  2344. using MDS techniques.
  2345. See also
  2346. <file:Documentation/admin-guide/hw-vuln/special-register-buffer-data-sampling.rst>
  2347. config MITIGATION_SSB
  2348. bool "Mitigate Speculative Store Bypass (SSB) hardware bug"
  2349. default y
  2350. help
  2351. Enable mitigation for Speculative Store Bypass (SSB). SSB is a
  2352. hardware security vulnerability and its exploitation takes advantage
  2353. of speculative execution in a similar way to the Meltdown and Spectre
  2354. security vulnerabilities.
  2355. config MITIGATION_ITS
  2356. bool "Enable Indirect Target Selection mitigation"
  2357. depends on CPU_SUP_INTEL && X86_64
  2358. depends on MITIGATION_RETPOLINE && MITIGATION_RETHUNK
  2359. select EXECMEM
  2360. default y
  2361. help
  2362. Enable Indirect Target Selection (ITS) mitigation. ITS is a bug in
  2363. BPU on some Intel CPUs that may allow Spectre V2 style attacks. If
  2364. disabled, mitigation cannot be enabled via cmdline.
  2365. See <file:Documentation/admin-guide/hw-vuln/indirect-target-selection.rst>
  2366. config MITIGATION_TSA
  2367. bool "Mitigate Transient Scheduler Attacks"
  2368. depends on CPU_SUP_AMD
  2369. default y
  2370. help
  2371. Enable mitigation for Transient Scheduler Attacks. TSA is a hardware
  2372. security vulnerability on AMD CPUs which can lead to forwarding of
  2373. invalid info to subsequent instructions and thus can affect their
  2374. timing and thereby cause a leakage.
  2375. config MITIGATION_VMSCAPE
  2376. bool "Mitigate VMSCAPE"
  2377. depends on KVM
  2378. default y
  2379. help
  2380. Enable mitigation for VMSCAPE attacks. VMSCAPE is a hardware security
  2381. vulnerability on Intel and AMD CPUs that may allow a guest to do
  2382. Spectre v2 style attacks on userspace hypervisor.
  2383. endif
  2384. config ARCH_HAS_ADD_PAGES
  2385. def_bool y
  2386. depends on ARCH_ENABLE_MEMORY_HOTPLUG
  2387. menu "Power management and ACPI options"
  2388. config ARCH_HIBERNATION_HEADER
  2389. def_bool y
  2390. depends on HIBERNATION
  2391. source "kernel/power/Kconfig"
  2392. source "drivers/acpi/Kconfig"
  2393. config X86_APM_BOOT
  2394. def_bool y
  2395. depends on APM
  2396. menuconfig APM
  2397. tristate "APM (Advanced Power Management) BIOS support"
  2398. depends on X86_32 && PM_SLEEP
  2399. help
  2400. APM is a BIOS specification for saving power using several different
  2401. techniques. This is mostly useful for battery powered laptops with
  2402. APM compliant BIOSes. If you say Y here, the system time will be
  2403. reset after a RESUME operation, the /proc/apm device will provide
  2404. battery status information, and user-space programs will receive
  2405. notification of APM "events" (e.g. battery status change).
  2406. If you select "Y" here, you can disable actual use of the APM
  2407. BIOS by passing the "apm=off" option to the kernel at boot time.
  2408. Note that the APM support is almost completely disabled for
  2409. machines with more than one CPU.
  2410. In order to use APM, you will need supporting software. For location
  2411. and more information, read <file:Documentation/power/apm-acpi.rst>
  2412. and the Battery Powered Linux mini-HOWTO, available from
  2413. <http://www.tldp.org/docs.html#howto>.
  2414. This driver does not spin down disk drives (see the hdparm(8)
  2415. manpage ("man 8 hdparm") for that), and it doesn't turn off
  2416. VESA-compliant "green" monitors.
  2417. This driver does not support the TI 4000M TravelMate and the ACER
  2418. 486/DX4/75 because they don't have compliant BIOSes. Many "green"
  2419. desktop machines also don't have compliant BIOSes, and this driver
  2420. may cause those machines to panic during the boot phase.
  2421. Generally, if you don't have a battery in your machine, there isn't
  2422. much point in using this driver and you should say N. If you get
  2423. random kernel OOPSes or reboots that don't seem to be related to
  2424. anything, try disabling/enabling this option (or disabling/enabling
  2425. APM in your BIOS).
  2426. Some other things you should try when experiencing seemingly random,
  2427. "weird" problems:
  2428. 1) make sure that you have enough swap space and that it is
  2429. enabled.
  2430. 2) pass the "idle=poll" option to the kernel
  2431. 3) switch on floating point emulation in the kernel and pass
  2432. the "no387" option to the kernel
  2433. 4) pass the "floppy=nodma" option to the kernel
  2434. 5) pass the "mem=4M" option to the kernel (thereby disabling
  2435. all but the first 4 MB of RAM)
  2436. 6) make sure that the CPU is not over clocked.
  2437. 7) read the sig11 FAQ at <http://www.bitwizard.nl/sig11/>
  2438. 8) disable the cache from your BIOS settings
  2439. 9) install a fan for the video card or exchange video RAM
  2440. 10) install a better fan for the CPU
  2441. 11) exchange RAM chips
  2442. 12) exchange the motherboard.
  2443. To compile this driver as a module, choose M here: the
  2444. module will be called apm.
  2445. if APM
  2446. config APM_IGNORE_USER_SUSPEND
  2447. bool "Ignore USER SUSPEND"
  2448. help
  2449. This option will ignore USER SUSPEND requests. On machines with a
  2450. compliant APM BIOS, you want to say N. However, on the NEC Versa M
  2451. series notebooks, it is necessary to say Y because of a BIOS bug.
  2452. config APM_DO_ENABLE
  2453. bool "Enable PM at boot time"
  2454. help
  2455. Enable APM features at boot time. From page 36 of the APM BIOS
  2456. specification: "When disabled, the APM BIOS does not automatically
  2457. power manage devices, enter the Standby State, enter the Suspend
  2458. State, or take power saving steps in response to CPU Idle calls."
  2459. This driver will make CPU Idle calls when Linux is idle (unless this
  2460. feature is turned off -- see "Do CPU IDLE calls", below). This
  2461. should always save battery power, but more complicated APM features
  2462. will be dependent on your BIOS implementation. You may need to turn
  2463. this option off if your computer hangs at boot time when using APM
  2464. support, or if it beeps continuously instead of suspending. Turn
  2465. this off if you have a NEC UltraLite Versa 33/C or a Toshiba
  2466. T400CDT. This is off by default since most machines do fine without
  2467. this feature.
  2468. config APM_CPU_IDLE
  2469. depends on CPU_IDLE
  2470. bool "Make CPU Idle calls when idle"
  2471. help
  2472. Enable calls to APM CPU Idle/CPU Busy inside the kernel's idle loop.
  2473. On some machines, this can activate improved power savings, such as
  2474. a slowed CPU clock rate, when the machine is idle. These idle calls
  2475. are made after the idle loop has run for some length of time (e.g.,
  2476. 333 mS). On some machines, this will cause a hang at boot time or
  2477. whenever the CPU becomes idle. (On machines with more than one CPU,
  2478. this option does nothing.)
  2479. config APM_DISPLAY_BLANK
  2480. bool "Enable console blanking using APM"
  2481. help
  2482. Enable console blanking using the APM. Some laptops can use this to
  2483. turn off the LCD backlight when the screen blanker of the Linux
  2484. virtual console blanks the screen. Note that this is only used by
  2485. the virtual console screen blanker, and won't turn off the backlight
  2486. when using the X Window system. This also doesn't have anything to
  2487. do with your VESA-compliant power-saving monitor. Further, this
  2488. option doesn't work for all laptops -- it might not turn off your
  2489. backlight at all, or it might print a lot of errors to the console,
  2490. especially if you are using gpm.
  2491. config APM_ALLOW_INTS
  2492. bool "Allow interrupts during APM BIOS calls"
  2493. help
  2494. Normally we disable external interrupts while we are making calls to
  2495. the APM BIOS as a measure to lessen the effects of a badly behaving
  2496. BIOS implementation. The BIOS should reenable interrupts if it
  2497. needs to. Unfortunately, some BIOSes do not -- especially those in
  2498. many of the newer IBM Thinkpads. If you experience hangs when you
  2499. suspend, try setting this to Y. Otherwise, say N.
  2500. endif # APM
  2501. source "drivers/cpufreq/Kconfig"
  2502. source "drivers/cpuidle/Kconfig"
  2503. source "drivers/idle/Kconfig"
  2504. endmenu
  2505. menu "Bus options (PCI etc.)"
  2506. choice
  2507. prompt "PCI access mode"
  2508. depends on X86_32 && PCI
  2509. default PCI_GOANY
  2510. help
  2511. On PCI systems, the BIOS can be used to detect the PCI devices and
  2512. determine their configuration. However, some old PCI motherboards
  2513. have BIOS bugs and may crash if this is done. Also, some embedded
  2514. PCI-based systems don't have any BIOS at all. Linux can also try to
  2515. detect the PCI hardware directly without using the BIOS.
  2516. With this option, you can specify how Linux should detect the
  2517. PCI devices. If you choose "BIOS", the BIOS will be used,
  2518. if you choose "Direct", the BIOS won't be used, and if you
  2519. choose "MMConfig", then PCI Express MMCONFIG will be used.
  2520. If you choose "Any", the kernel will try MMCONFIG, then the
  2521. direct access method and falls back to the BIOS if that doesn't
  2522. work. If unsure, go with the default, which is "Any".
  2523. config PCI_GOBIOS
  2524. bool "BIOS"
  2525. config PCI_GOMMCONFIG
  2526. bool "MMConfig"
  2527. config PCI_GODIRECT
  2528. bool "Direct"
  2529. config PCI_GOOLPC
  2530. bool "OLPC XO-1"
  2531. depends on OLPC
  2532. config PCI_GOANY
  2533. bool "Any"
  2534. endchoice
  2535. config PCI_BIOS
  2536. def_bool y
  2537. depends on X86_32 && PCI && (PCI_GOBIOS || PCI_GOANY)
  2538. # x86-64 doesn't support PCI BIOS access from long mode so always go direct.
  2539. config PCI_DIRECT
  2540. def_bool y
  2541. depends on PCI && (X86_64 || (PCI_GODIRECT || PCI_GOANY || PCI_GOOLPC || PCI_GOMMCONFIG))
  2542. config PCI_MMCONFIG
  2543. bool "Support mmconfig PCI config space access" if X86_64
  2544. default y
  2545. depends on PCI && (ACPI || JAILHOUSE_GUEST)
  2546. depends on X86_64 || (PCI_GOANY || PCI_GOMMCONFIG)
  2547. config PCI_OLPC
  2548. def_bool y
  2549. depends on PCI && OLPC && (PCI_GOOLPC || PCI_GOANY)
  2550. config PCI_XEN
  2551. def_bool y
  2552. depends on PCI && XEN
  2553. config MMCONF_FAM10H
  2554. def_bool y
  2555. depends on X86_64 && PCI_MMCONFIG && ACPI
  2556. config PCI_CNB20LE_QUIRK
  2557. bool "Read CNB20LE Host Bridge Windows" if EXPERT
  2558. depends on PCI
  2559. help
  2560. Read the PCI windows out of the CNB20LE host bridge. This allows
  2561. PCI hotplug to work on systems with the CNB20LE chipset which do
  2562. not have ACPI.
  2563. There's no public spec for this chipset, and this functionality
  2564. is known to be incomplete.
  2565. You should say N unless you know you need this.
  2566. config ISA_BUS
  2567. bool "ISA bus support on modern systems" if EXPERT
  2568. help
  2569. Expose ISA bus device drivers and options available for selection and
  2570. configuration. Enable this option if your target machine has an ISA
  2571. bus. ISA is an older system, displaced by PCI and newer bus
  2572. architectures -- if your target machine is modern, it probably does
  2573. not have an ISA bus.
  2574. If unsure, say N.
  2575. # x86_64 have no ISA slots, but can have ISA-style DMA.
  2576. config ISA_DMA_API
  2577. bool "ISA-style DMA support" if (X86_64 && EXPERT)
  2578. default y
  2579. help
  2580. Enables ISA-style DMA support for devices requiring such controllers.
  2581. If unsure, say Y.
  2582. if X86_32
  2583. config ISA
  2584. bool "ISA support"
  2585. help
  2586. Find out whether you have ISA slots on your motherboard. ISA is the
  2587. name of a bus system, i.e. the way the CPU talks to the other stuff
  2588. inside your box. Other bus systems are PCI, EISA, MicroChannel
  2589. (MCA) or VESA. ISA is an older system, now being displaced by PCI;
  2590. newer boards don't support it. If you have ISA, say Y, otherwise N.
  2591. config SCx200
  2592. tristate "NatSemi SCx200 support"
  2593. help
  2594. This provides basic support for National Semiconductor's
  2595. (now AMD's) Geode processors. The driver probes for the
  2596. PCI-IDs of several on-chip devices, so its a good dependency
  2597. for other scx200_* drivers.
  2598. If compiled as a module, the driver is named scx200.
  2599. config SCx200HR_TIMER
  2600. tristate "NatSemi SCx200 27MHz High-Resolution Timer Support"
  2601. depends on SCx200
  2602. default y
  2603. help
  2604. This driver provides a clocksource built upon the on-chip
  2605. 27MHz high-resolution timer. Its also a workaround for
  2606. NSC Geode SC-1100's buggy TSC, which loses time when the
  2607. processor goes idle (as is done by the scheduler). The
  2608. other workaround is idle=poll boot option.
  2609. config OLPC
  2610. bool "One Laptop Per Child support"
  2611. depends on !X86_PAE
  2612. select GPIOLIB
  2613. select OF
  2614. select OF_PROMTREE
  2615. select IRQ_DOMAIN
  2616. select OLPC_EC
  2617. help
  2618. Add support for detecting the unique features of the OLPC
  2619. XO hardware.
  2620. config OLPC_XO1_PM
  2621. bool "OLPC XO-1 Power Management"
  2622. depends on OLPC && MFD_CS5535=y && PM_SLEEP
  2623. help
  2624. Add support for poweroff and suspend of the OLPC XO-1 laptop.
  2625. config OLPC_XO1_RTC
  2626. bool "OLPC XO-1 Real Time Clock"
  2627. depends on OLPC_XO1_PM && RTC_DRV_CMOS
  2628. help
  2629. Add support for the XO-1 real time clock, which can be used as a
  2630. programmable wakeup source.
  2631. config OLPC_XO1_SCI
  2632. bool "OLPC XO-1 SCI extras"
  2633. depends on OLPC && OLPC_XO1_PM && GPIO_CS5535=y
  2634. depends on INPUT=y
  2635. select POWER_SUPPLY
  2636. help
  2637. Add support for SCI-based features of the OLPC XO-1 laptop:
  2638. - EC-driven system wakeups
  2639. - Power button
  2640. - Ebook switch
  2641. - Lid switch
  2642. - AC adapter status updates
  2643. - Battery status updates
  2644. config OLPC_XO15_SCI
  2645. bool "OLPC XO-1.5 SCI extras"
  2646. depends on OLPC && ACPI
  2647. select POWER_SUPPLY
  2648. help
  2649. Add support for SCI-based features of the OLPC XO-1.5 laptop:
  2650. - EC-driven system wakeups
  2651. - AC adapter status updates
  2652. - Battery status updates
  2653. config GEODE_COMMON
  2654. bool
  2655. config ALIX
  2656. bool "PCEngines ALIX System Support (LED setup)"
  2657. select GPIOLIB
  2658. select GEODE_COMMON
  2659. help
  2660. This option enables system support for the PCEngines ALIX.
  2661. At present this just sets up LEDs for GPIO control on
  2662. ALIX2/3/6 boards. However, other system specific setup should
  2663. get added here.
  2664. Note: You must still enable the drivers for GPIO and LED support
  2665. (GPIO_CS5535 & LEDS_GPIO) to actually use the LEDs
  2666. Note: You have to set alix.force=1 for boards with Award BIOS.
  2667. config NET5501
  2668. bool "Soekris Engineering net5501 System Support (LEDS, GPIO, etc)"
  2669. select GPIOLIB
  2670. select GEODE_COMMON
  2671. help
  2672. This option enables system support for the Soekris Engineering net5501.
  2673. config GEOS
  2674. bool "Traverse Technologies GEOS System Support (LEDS, GPIO, etc)"
  2675. select GPIOLIB
  2676. select GEODE_COMMON
  2677. depends on DMI
  2678. help
  2679. This option enables system support for the Traverse Technologies GEOS.
  2680. config TS5500
  2681. bool "Technologic Systems TS-5500 platform support"
  2682. depends on MELAN
  2683. select CHECK_SIGNATURE
  2684. select NEW_LEDS
  2685. select LEDS_CLASS
  2686. help
  2687. This option enables system support for the Technologic Systems TS-5500.
  2688. endif # X86_32
  2689. config AMD_NB
  2690. def_bool y
  2691. depends on CPU_SUP_AMD && PCI
  2692. endmenu
  2693. menu "Binary Emulations"
  2694. config IA32_EMULATION
  2695. bool "IA32 Emulation"
  2696. depends on X86_64
  2697. select ARCH_WANT_OLD_COMPAT_IPC
  2698. select BINFMT_ELF
  2699. select COMPAT_OLD_SIGACTION
  2700. help
  2701. Include code to run legacy 32-bit programs under a
  2702. 64-bit kernel. You should likely turn this on, unless you're
  2703. 100% sure that you don't have any 32-bit programs left.
  2704. config IA32_EMULATION_DEFAULT_DISABLED
  2705. bool "IA32 emulation disabled by default"
  2706. default n
  2707. depends on IA32_EMULATION
  2708. help
  2709. Make IA32 emulation disabled by default. This prevents loading 32-bit
  2710. processes and access to 32-bit syscalls. If unsure, leave it to its
  2711. default value.
  2712. config X86_X32_ABI
  2713. bool "x32 ABI for 64-bit mode"
  2714. depends on X86_64
  2715. # llvm-objcopy does not convert x86_64 .note.gnu.property or
  2716. # compressed debug sections to x86_x32 properly:
  2717. # https://github.com/ClangBuiltLinux/linux/issues/514
  2718. # https://github.com/ClangBuiltLinux/linux/issues/1141
  2719. depends on $(success,$(OBJCOPY) --version | head -n1 | grep -qv llvm)
  2720. help
  2721. Include code to run binaries for the x32 native 32-bit ABI
  2722. for 64-bit processors. An x32 process gets access to the
  2723. full 64-bit register file and wide data path while leaving
  2724. pointers at 32 bits for smaller memory footprint.
  2725. config COMPAT_32
  2726. def_bool y
  2727. depends on IA32_EMULATION || X86_32
  2728. select HAVE_UID16
  2729. select OLD_SIGSUSPEND3
  2730. config COMPAT
  2731. def_bool y
  2732. depends on IA32_EMULATION || X86_X32_ABI
  2733. config COMPAT_FOR_U64_ALIGNMENT
  2734. def_bool y
  2735. depends on COMPAT
  2736. endmenu
  2737. config HAVE_ATOMIC_IOMAP
  2738. def_bool y
  2739. depends on X86_32
  2740. source "arch/x86/kvm/Kconfig"
  2741. source "arch/x86/Kconfig.assembler"