Kconfig 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. # SPDX-License-Identifier: GPL-2.0
  2. menu "UML-specific options"
  3. config UML
  4. bool
  5. default y
  6. select ARCH_EPHEMERAL_INODES
  7. select ARCH_HAS_CPU_FINALIZE_INIT
  8. select ARCH_HAS_FORTIFY_SOURCE
  9. select ARCH_HAS_GCOV_PROFILE_ALL
  10. select ARCH_HAS_KCOV
  11. select ARCH_HAS_STRNCPY_FROM_USER
  12. select ARCH_HAS_STRNLEN_USER
  13. select ARCH_NO_PREEMPT
  14. select HAVE_ARCH_AUDITSYSCALL
  15. select HAVE_ARCH_KASAN if X86_64
  16. select HAVE_ARCH_KASAN_VMALLOC if HAVE_ARCH_KASAN
  17. select HAVE_ARCH_SECCOMP_FILTER
  18. select HAVE_ASM_MODVERSIONS
  19. select HAVE_UID16
  20. select HAVE_DEBUG_KMEMLEAK
  21. select HAVE_DEBUG_BUGVERBOSE
  22. select NO_DMA if !UML_DMA_EMULATION
  23. select OF_EARLY_FLATTREE if OF
  24. select GENERIC_IRQ_SHOW
  25. select GENERIC_CPU_DEVICES
  26. select HAVE_GCC_PLUGINS
  27. select TRACE_IRQFLAGS_SUPPORT
  28. select TTY # Needed for line.c
  29. select HAVE_ARCH_VMAP_STACK
  30. config MMU
  31. bool
  32. default y
  33. config UML_DMA_EMULATION
  34. bool
  35. config NO_IOMEM
  36. bool "disable IOMEM" if EXPERT
  37. depends on !INDIRECT_IOMEM
  38. default y if !KUNIT
  39. config HAS_IOMEM
  40. bool "Turns on fake IOMEM support for KUnit"
  41. depends on KUNIT
  42. select MOCK_IOMEM
  43. config UML_IOMEM_EMULATION
  44. bool
  45. select INDIRECT_IOMEM
  46. select GENERIC_PCI_IOMAP
  47. select GENERIC_IOMAP
  48. select NO_GENERIC_PCI_IOPORT_MAP
  49. config NO_IOPORT_MAP
  50. def_bool y
  51. config ISA
  52. bool
  53. config SBUS
  54. bool
  55. config LOCKDEP_SUPPORT
  56. bool
  57. default y
  58. config STACKTRACE_SUPPORT
  59. bool
  60. default y
  61. select STACKTRACE
  62. config GENERIC_CALIBRATE_DELAY
  63. bool
  64. default y
  65. config HZ
  66. int
  67. default 100
  68. config NR_CPUS
  69. int
  70. range 1 1
  71. default 1
  72. config ARCH_HAS_CACHE_LINE_SIZE
  73. def_bool y
  74. source "arch/$(HEADER_ARCH)/um/Kconfig"
  75. config MAY_HAVE_RUNTIME_DEPS
  76. bool
  77. config STATIC_LINK
  78. bool "Force a static link"
  79. depends on CC_CAN_LINK_STATIC_NO_RUNTIME_DEPS || !MAY_HAVE_RUNTIME_DEPS
  80. help
  81. This option gives you the ability to force a static link of UML.
  82. Normally, UML is linked as a shared binary. This is inconvenient for
  83. use in a chroot jail. So, if you intend to run UML inside a chroot,
  84. you probably want to say Y here.
  85. Additionally, this option enables using higher memory spaces (up to
  86. 2.75G) for UML.
  87. NOTE: This option is incompatible with some networking features which
  88. depend on features that require being dynamically loaded (like NSS).
  89. config LD_SCRIPT_STATIC
  90. bool
  91. default y
  92. depends on STATIC_LINK
  93. config LD_SCRIPT_DYN
  94. bool
  95. default y
  96. depends on !LD_SCRIPT_STATIC
  97. config LD_SCRIPT_DYN_RPATH
  98. bool "set rpath in the binary" if EXPERT
  99. default y
  100. depends on LD_SCRIPT_DYN
  101. help
  102. Add /lib (and /lib64 for 64-bit) to the linux binary's rpath
  103. explicitly.
  104. You may need to turn this off if compiling for nix systems
  105. that have their libraries in random /nix directories and
  106. might otherwise unexpected use libraries from /lib or /lib64
  107. instead of the desired ones.
  108. config HOSTFS
  109. tristate "Host filesystem"
  110. help
  111. While the User-Mode Linux port uses its own root file system for
  112. booting and normal file access, this module lets the UML user
  113. access files stored on the host. It does not require any
  114. network connection between the Host and UML. An example use of
  115. this might be:
  116. mount none /tmp/fromhost -t hostfs -o /tmp/umlshare
  117. where /tmp/fromhost is an empty directory inside UML and
  118. /tmp/umlshare is a directory on the host with files the UML user
  119. wishes to access.
  120. For more information, see
  121. <http://user-mode-linux.sourceforge.net/hostfs.html>.
  122. If you'd like to be able to work with files stored on the host,
  123. say Y or M here; otherwise say N.
  124. config MCONSOLE
  125. bool "Management console"
  126. depends on PROC_FS
  127. default y
  128. help
  129. The user mode linux management console is a low-level interface to
  130. the kernel, somewhat like the i386 SysRq interface. Since there is
  131. a full-blown operating system running under every user mode linux
  132. instance, there is much greater flexibility possible than with the
  133. SysRq mechanism.
  134. If you answer 'Y' to this option, to use this feature, you need the
  135. mconsole client (called uml_mconsole) which is present in CVS in
  136. 2.4.5-9um and later (path /tools/mconsole), and is also in the
  137. distribution RPM package in 2.4.6 and later.
  138. It is safe to say 'Y' here.
  139. config MAGIC_SYSRQ
  140. bool "Magic SysRq key"
  141. depends on MCONSOLE
  142. help
  143. If you say Y here, you will have some control over the system even
  144. if the system crashes for example during kernel debugging (e.g., you
  145. will be able to flush the buffer cache to disk, reboot the system
  146. immediately or dump some status information). A key for each of the
  147. possible requests is provided.
  148. This is the feature normally accomplished by pressing a key
  149. while holding SysRq (Alt+PrintScreen).
  150. On UML, this is accomplished by sending a "sysrq" command with
  151. mconsole, followed by the letter for the requested command.
  152. The keys are documented in <file:Documentation/admin-guide/sysrq.rst>. Don't say Y
  153. unless you really know what this hack does.
  154. config KERNEL_STACK_ORDER
  155. int "Kernel stack size order"
  156. default 2 if 64BIT
  157. range 2 10 if 64BIT
  158. default 1 if !64BIT
  159. help
  160. This option determines the size of UML kernel stacks. They will
  161. be 1 << order pages. The default is OK unless you're running Valgrind
  162. on UML, in which case, set this to 3.
  163. It is possible to reduce the stack to 1 for 64BIT and 0 for 32BIT on
  164. older (pre-2017) CPUs. It is not recommended on newer CPUs due to the
  165. increase in the size of the state which needs to be saved when handling
  166. signals.
  167. config MMAPPER
  168. tristate "iomem emulation driver"
  169. help
  170. This driver allows a host file to be used as emulated IO memory inside
  171. UML.
  172. config PGTABLE_LEVELS
  173. int
  174. default 3 if 3_LEVEL_PGTABLES
  175. default 2
  176. config UML_TIME_TRAVEL_SUPPORT
  177. bool
  178. prompt "Support time-travel mode (e.g. for test execution)"
  179. # inf-cpu mode is incompatible with the benchmarking
  180. depends on !RAID6_PQ_BENCHMARK
  181. depends on !SMP
  182. help
  183. Enable this option to support time travel inside the UML instance.
  184. After enabling this option, two modes are accessible at runtime
  185. (selected by the kernel command line), see the kernel's command-
  186. line help for more details.
  187. It is safe to say Y, but you probably don't need this.
  188. config PLATFORM_MOCK
  189. bool "Enable a mock architecture used for unit testing."
  190. depends on KUNIT && OF
  191. default y
  192. config KASAN_SHADOW_OFFSET
  193. hex
  194. depends on KASAN
  195. default 0x100000000000
  196. help
  197. This is the offset at which the ~16TB of shadow memory is
  198. mapped and used by KASAN for memory debugging. This can be any
  199. address that has at least KASAN_SHADOW_SIZE (total address space divided
  200. by 8) amount of space so that the KASAN shadow memory does not conflict
  201. with anything. The default is 0x100000000000, which works even if mem is
  202. set to a large value. On low-memory systems, try 0x7fff8000, as it fits
  203. into the immediate of most instructions, improving performance.
  204. endmenu
  205. source "arch/um/drivers/Kconfig"
  206. config ARCH_SUSPEND_POSSIBLE
  207. def_bool y
  208. source "kernel/power/Kconfig"