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