Kconfig 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. # SPDX-License-Identifier: GPL-2.0
  2. menu "UML-specific options"
  3. config UML
  4. bool
  5. default y
  6. select ARCH_DISABLE_KASAN_INLINE if STATIC_LINK
  7. select ARCH_NEEDS_DEFER_KASAN if STATIC_LINK
  8. select ARCH_WANTS_DYNAMIC_TASK_STRUCT
  9. select ARCH_HAS_CACHE_LINE_SIZE
  10. select ARCH_HAS_CPU_FINALIZE_INIT
  11. select ARCH_HAS_FORTIFY_SOURCE
  12. select ARCH_HAS_GCOV_PROFILE_ALL
  13. select ARCH_HAS_KCOV
  14. select ARCH_HAS_STRNCPY_FROM_USER
  15. select ARCH_HAS_STRNLEN_USER
  16. select ARCH_HAS_STRICT_KERNEL_RWX
  17. select HAVE_ARCH_AUDITSYSCALL
  18. select HAVE_ARCH_KASAN if X86_64
  19. select HAVE_ARCH_KASAN_VMALLOC if HAVE_ARCH_KASAN
  20. select HAVE_ARCH_SECCOMP_FILTER
  21. select HAVE_ASM_MODVERSIONS
  22. select HAVE_UID16
  23. select HAVE_DEBUG_KMEMLEAK
  24. select HAVE_DEBUG_BUGVERBOSE
  25. select HAVE_PAGE_SIZE_4KB
  26. select NO_DMA if !UML_DMA_EMULATION
  27. select OF_EARLY_FLATTREE if OF
  28. select GENERIC_IRQ_SHOW
  29. select GENERIC_CPU_DEVICES
  30. select GENERIC_SMP_IDLE_THREAD
  31. select HAVE_GCC_PLUGINS
  32. select ARCH_SUPPORTS_LTO_CLANG
  33. select ARCH_SUPPORTS_LTO_CLANG_THIN
  34. select TRACE_IRQFLAGS_SUPPORT
  35. select TTY # Needed for line.c
  36. select HAVE_ARCH_VMAP_STACK
  37. select HAVE_RUST
  38. select ARCH_HAS_UBSAN
  39. select HAVE_ARCH_TRACEHOOK
  40. select HAVE_SYSCALL_TRACEPOINTS
  41. select THREAD_INFO_IN_TASK
  42. select SPARSE_IRQ
  43. select MMU_GATHER_RCU_TABLE_FREE
  44. config MMU
  45. bool
  46. default y
  47. config UML_DMA_EMULATION
  48. bool
  49. config NO_IOMEM
  50. bool "disable IOMEM" if EXPERT
  51. depends on !INDIRECT_IOMEM
  52. default y
  53. config UML_IOMEM_EMULATION
  54. bool
  55. select INDIRECT_IOMEM
  56. select GENERIC_PCI_IOMAP
  57. config ISA
  58. bool
  59. config SBUS
  60. bool
  61. config LOCKDEP_SUPPORT
  62. bool
  63. default y
  64. config STACKTRACE_SUPPORT
  65. bool
  66. default y
  67. select STACKTRACE
  68. config GENERIC_CALIBRATE_DELAY
  69. bool
  70. default y
  71. config HZ
  72. int
  73. default 100
  74. config UML_SUBARCH_SUPPORTS_SMP
  75. bool
  76. config SMP
  77. bool "Symmetric multi-processing support"
  78. default n
  79. depends on UML_SUBARCH_SUPPORTS_SMP
  80. help
  81. This option enables UML SMP support.
  82. With this enabled, users can tell UML to start multiple virtual
  83. processors. Each virtual processor is represented as a separate
  84. host thread.
  85. In UML, kthreads and normal threads (when running in kernel mode)
  86. can be scheduled and executed simultaneously on different virtual
  87. processors. However, the userspace code of normal threads still
  88. runs within their respective single-threaded stubs.
  89. That is, SMP support is available both within the kernel and
  90. across different processes, but remains limited within threads
  91. of the same process in userspace.
  92. config NR_CPUS_RANGE_BEGIN
  93. int
  94. default 1 if !SMP
  95. default 2
  96. config NR_CPUS_RANGE_END
  97. int
  98. default 1 if !SMP
  99. default 64
  100. config NR_CPUS_DEFAULT
  101. int
  102. default 1 if !SMP
  103. default 2
  104. config NR_CPUS
  105. int "Maximum number of CPUs" if SMP
  106. range NR_CPUS_RANGE_BEGIN NR_CPUS_RANGE_END
  107. default NR_CPUS_DEFAULT
  108. source "arch/$(HEADER_ARCH)/um/Kconfig"
  109. config MAY_HAVE_RUNTIME_DEPS
  110. bool
  111. config STATIC_LINK
  112. bool "Force a static link"
  113. depends on !MAY_HAVE_RUNTIME_DEPS
  114. help
  115. This option gives you the ability to force a static link of UML.
  116. Normally, UML is linked as a shared binary. This is inconvenient for
  117. use in a chroot jail. So, if you intend to run UML inside a chroot,
  118. you probably want to say Y here.
  119. Additionally, this option enables using higher memory spaces (up to
  120. 2.75G) for UML.
  121. NOTE: This option is incompatible with some networking features which
  122. depend on features that require being dynamically loaded (like NSS).
  123. config LD_SCRIPT_STATIC
  124. bool
  125. default y
  126. depends on STATIC_LINK
  127. config LD_SCRIPT_DYN
  128. bool
  129. default y
  130. depends on !LD_SCRIPT_STATIC
  131. config LD_SCRIPT_DYN_RPATH
  132. bool "set rpath in the binary" if EXPERT
  133. default y
  134. depends on LD_SCRIPT_DYN
  135. help
  136. Add /lib (and /lib64 for 64-bit) to the linux binary's rpath
  137. explicitly.
  138. You may need to turn this off if compiling for nix systems
  139. that have their libraries in random /nix directories and
  140. might otherwise unexpected use libraries from /lib or /lib64
  141. instead of the desired ones.
  142. config HOSTFS
  143. tristate "Host filesystem"
  144. help
  145. While the User-Mode Linux port uses its own root file system for
  146. booting and normal file access, this module lets the UML user
  147. access files stored on the host. It does not require any
  148. network connection between the Host and UML. An example use of
  149. this might be:
  150. mount none /tmp/fromhost -t hostfs -o /tmp/umlshare
  151. where /tmp/fromhost is an empty directory inside UML and
  152. /tmp/umlshare is a directory on the host with files the UML user
  153. wishes to access.
  154. For more information, see
  155. <http://user-mode-linux.sourceforge.net/hostfs.html>.
  156. If you'd like to be able to work with files stored on the host,
  157. say Y or M here; otherwise say N.
  158. config MCONSOLE
  159. bool "Management console"
  160. depends on PROC_FS
  161. default y
  162. help
  163. The user mode linux management console is a low-level interface to
  164. the kernel, somewhat like the i386 SysRq interface. Since there is
  165. a full-blown operating system running under every user mode linux
  166. instance, there is much greater flexibility possible than with the
  167. SysRq mechanism.
  168. If you answer 'Y' to this option, to use this feature, you need the
  169. mconsole client (called uml_mconsole) which is present in CVS in
  170. 2.4.5-9um and later (path /tools/mconsole), and is also in the
  171. distribution RPM package in 2.4.6 and later.
  172. It is safe to say 'Y' here.
  173. config MAGIC_SYSRQ
  174. bool "Magic SysRq key"
  175. depends on MCONSOLE
  176. help
  177. If you say Y here, you will have some control over the system even
  178. if the system crashes for example during kernel debugging (e.g., you
  179. will be able to flush the buffer cache to disk, reboot the system
  180. immediately or dump some status information). A key for each of the
  181. possible requests is provided.
  182. This is the feature normally accomplished by pressing a key
  183. while holding SysRq (Alt+PrintScreen).
  184. On UML, this is accomplished by sending a "sysrq" command with
  185. mconsole, followed by the letter for the requested command.
  186. The keys are documented in <file:Documentation/admin-guide/sysrq.rst>. Don't say Y
  187. unless you really know what this hack does.
  188. config KERNEL_STACK_ORDER
  189. int "Kernel stack size order"
  190. default 2 if 64BIT
  191. range 2 10 if 64BIT
  192. default 1 if !64BIT
  193. help
  194. This option determines the size of UML kernel stacks. They will
  195. be 1 << order pages. The default is OK unless you're running Valgrind
  196. on UML, in which case, set this to 3.
  197. It is possible to reduce the stack to 1 for 64BIT and 0 for 32BIT on
  198. older (pre-2017) CPUs. It is not recommended on newer CPUs due to the
  199. increase in the size of the state which needs to be saved when handling
  200. signals.
  201. config PGTABLE_LEVELS
  202. int
  203. default 4 if 64BIT
  204. default 2 if !64BIT
  205. config UML_TIME_TRAVEL_SUPPORT
  206. bool
  207. prompt "Support time-travel mode (e.g. for test execution)"
  208. # inf-cpu mode is incompatible with the benchmarking
  209. depends on !RAID6_PQ_BENCHMARK
  210. depends on !SMP
  211. help
  212. Enable this option to support time travel inside the UML instance.
  213. After enabling this option, two modes are accessible at runtime
  214. (selected by the kernel command line), see the kernel's command-
  215. line help for more details.
  216. It is safe to say Y, but you probably don't need this.
  217. config UML_MAX_USERSPACE_ITERATIONS
  218. int
  219. prompt "Maximum number of unscheduled userspace iterations"
  220. default 10000
  221. depends on UML_TIME_TRAVEL_SUPPORT
  222. help
  223. In UML inf-cpu and ext time-travel mode userspace can run without being
  224. interrupted. This will eventually overwhelm the kernel and create OOM
  225. situations (mainly RCU not running). This setting specifies the number
  226. of kernel/userspace switches (minor/major page fault, signal or syscall)
  227. for the same userspace thread before the sched_clock is advanced by a
  228. jiffie to trigger scheduling.
  229. Setting it to zero disables the feature.
  230. config KASAN_SHADOW_OFFSET
  231. hex
  232. depends on KASAN
  233. default 0x100000000000
  234. help
  235. This is the offset at which the ~16TB of shadow memory is
  236. mapped and used by KASAN for memory debugging. This can be any
  237. address that has at least KASAN_SHADOW_SIZE (total address space divided
  238. by 8) amount of space so that the KASAN shadow memory does not conflict
  239. with anything. The default is 0x100000000000, which works even if mem is
  240. set to a large value. On low-memory systems, try 0x7fff8000, as it fits
  241. into the immediate of most instructions, improving performance.
  242. endmenu
  243. source "arch/um/drivers/Kconfig"
  244. config ARCH_SUSPEND_POSSIBLE
  245. def_bool y
  246. depends on !SMP
  247. menu "Power management options"
  248. source "kernel/power/Kconfig"
  249. endmenu