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