179b05c1fSChristoph Hellwig# SPDX-License-Identifier: GPL-2.0 279b05c1fSChristoph Hellwig 3f163977dSChristoph Hellwigmenu "UML-specific options" 4f163977dSChristoph Hellwig 5f163977dSChristoph Hellwigconfig UML 6f163977dSChristoph Hellwig bool 7f163977dSChristoph Hellwig default y 8*a3209bb9SChristophe Leroy (CS GROUP) select ARCH_DISABLE_KASAN_INLINE if STATIC_LINK 91e338f4dSSabyrzhan Tasbolatov select ARCH_NEEDS_DEFER_KASAN if STATIC_LINK 103f17fed2SBenjamin Berg select ARCH_WANTS_DYNAMIC_TASK_STRUCT 115d2c5b8cSTiwei Bie select ARCH_HAS_CACHE_LINE_SIZE 129349b5cdSThomas Gleixner select ARCH_HAS_CPU_FINALIZE_INIT 13ba38961aSKees Cook select ARCH_HAS_FORTIFY_SOURCE 142419ac32SVincent Whitchurch select ARCH_HAS_GCOV_PROFILE_ALL 15f163977dSChristoph Hellwig select ARCH_HAS_KCOV 16e6226997SArnd Bergmann select ARCH_HAS_STRNCPY_FROM_USER 17e6226997SArnd Bergmann select ARCH_HAS_STRNLEN_USER 18d1d7f01fSJohannes Berg select ARCH_HAS_STRICT_KERNEL_RWX 19f163977dSChristoph Hellwig select HAVE_ARCH_AUDITSYSCALL 205b301409SPatricia Alfonso select HAVE_ARCH_KASAN if X86_64 215b301409SPatricia Alfonso select HAVE_ARCH_KASAN_VMALLOC if HAVE_ARCH_KASAN 22f163977dSChristoph Hellwig select HAVE_ARCH_SECCOMP_FILTER 232ff2b7ecSMasahiro Yamada select HAVE_ASM_MODVERSIONS 24f163977dSChristoph Hellwig select HAVE_UID16 25f163977dSChristoph Hellwig select HAVE_DEBUG_KMEMLEAK 260d76433cSHernán Gonzalez select HAVE_DEBUG_BUGVERBOSE 275394f1e9SArnd Bergmann select HAVE_PAGE_SIZE_4KB 2868f5d3f3SJohannes Berg select NO_DMA if !UML_DMA_EMULATION 29b31297f0SVincent Whitchurch select OF_EARLY_FLATTREE if OF 30f163977dSChristoph Hellwig select GENERIC_IRQ_SHOW 31f163977dSChristoph Hellwig select GENERIC_CPU_DEVICES 321e4ee513STiwei Bie select GENERIC_SMP_IDLE_THREAD 33f163977dSChristoph Hellwig select HAVE_GCC_PLUGINS 3483e913f5SPeter Foley select ARCH_SUPPORTS_LTO_CLANG 3583e913f5SPeter Foley select ARCH_SUPPORTS_LTO_CLANG_THIN 364aae683fSMasahiro Yamada select TRACE_IRQFLAGS_SUPPORT 37f163977dSChristoph Hellwig select TTY # Needed for line.c 38bc5c49d7SJohannes Berg select HAVE_ARCH_VMAP_STACK 39ab0f4cedSDavid Gow select HAVE_RUST 4053585f9eSJohannes Berg select ARCH_HAS_UBSAN 413f17fed2SBenjamin Berg select HAVE_ARCH_TRACEHOOK 422a713f04SThomas Weißschuh select HAVE_SYSCALL_TRACEPOINTS 432f681ba4SBenjamin Berg select THREAD_INFO_IN_TASK 4435fae10aSSinan Nalkaya select SPARSE_IRQ 45f163977dSChristoph Hellwig 46f163977dSChristoph Hellwigconfig MMU 47f163977dSChristoph Hellwig bool 48f163977dSChristoph Hellwig default y 49f163977dSChristoph Hellwig 5068f5d3f3SJohannes Bergconfig UML_DMA_EMULATION 5168f5d3f3SJohannes Berg bool 5268f5d3f3SJohannes Berg 53f163977dSChristoph Hellwigconfig NO_IOMEM 540bbadafdSJohannes Berg bool "disable IOMEM" if EXPERT 5568f5d3f3SJohannes Berg depends on !INDIRECT_IOMEM 560bbadafdSJohannes Berg default y 570bbadafdSJohannes Berg 5868f5d3f3SJohannes Bergconfig UML_IOMEM_EMULATION 5968f5d3f3SJohannes Berg bool 6068f5d3f3SJohannes Berg select INDIRECT_IOMEM 6168f5d3f3SJohannes Berg select GENERIC_PCI_IOMAP 62f163977dSChristoph Hellwig 63f163977dSChristoph Hellwigconfig ISA 64f163977dSChristoph Hellwig bool 65f163977dSChristoph Hellwig 66f163977dSChristoph Hellwigconfig SBUS 67f163977dSChristoph Hellwig bool 68f163977dSChristoph Hellwig 69f163977dSChristoph Hellwigconfig LOCKDEP_SUPPORT 70f163977dSChristoph Hellwig bool 71f163977dSChristoph Hellwig default y 72f163977dSChristoph Hellwig 73f163977dSChristoph Hellwigconfig STACKTRACE_SUPPORT 74f163977dSChristoph Hellwig bool 75f163977dSChristoph Hellwig default y 76f163977dSChristoph Hellwig select STACKTRACE 77f163977dSChristoph Hellwig 78f163977dSChristoph Hellwigconfig GENERIC_CALIBRATE_DELAY 79f163977dSChristoph Hellwig bool 80f163977dSChristoph Hellwig default y 81f163977dSChristoph Hellwig 82f163977dSChristoph Hellwigconfig HZ 83f163977dSChristoph Hellwig int 84f163977dSChristoph Hellwig default 100 85f163977dSChristoph Hellwig 861e4ee513STiwei Bieconfig UML_SUBARCH_SUPPORTS_SMP 871e4ee513STiwei Bie bool 881e4ee513STiwei Bie 891e4ee513STiwei Bieconfig SMP 901e4ee513STiwei Bie bool "Symmetric multi-processing support" 911e4ee513STiwei Bie default n 921e4ee513STiwei Bie depends on UML_SUBARCH_SUPPORTS_SMP 931e4ee513STiwei Bie help 941e4ee513STiwei Bie This option enables UML SMP support. 951e4ee513STiwei Bie 961e4ee513STiwei Bie With this enabled, users can tell UML to start multiple virtual 971e4ee513STiwei Bie processors. Each virtual processor is represented as a separate 981e4ee513STiwei Bie host thread. 991e4ee513STiwei Bie 1001e4ee513STiwei Bie In UML, kthreads and normal threads (when running in kernel mode) 1011e4ee513STiwei Bie can be scheduled and executed simultaneously on different virtual 1021e4ee513STiwei Bie processors. However, the userspace code of normal threads still 1031e4ee513STiwei Bie runs within their respective single-threaded stubs. 1041e4ee513STiwei Bie 1051e4ee513STiwei Bie That is, SMP support is available both within the kernel and 1061e4ee513STiwei Bie across different processes, but remains limited within threads 1071e4ee513STiwei Bie of the same process in userspace. 1081e4ee513STiwei Bie 1091e4ee513STiwei Bieconfig NR_CPUS_RANGE_BEGIN 110f163977dSChristoph Hellwig int 1111e4ee513STiwei Bie default 1 if !SMP 1121e4ee513STiwei Bie default 2 1131e4ee513STiwei Bie 1141e4ee513STiwei Bieconfig NR_CPUS_RANGE_END 1151e4ee513STiwei Bie int 1161e4ee513STiwei Bie default 1 if !SMP 1171e4ee513STiwei Bie default 64 1181e4ee513STiwei Bie 1191e4ee513STiwei Bieconfig NR_CPUS_DEFAULT 1201e4ee513STiwei Bie int 1211e4ee513STiwei Bie default 1 if !SMP 1221e4ee513STiwei Bie default 2 1231e4ee513STiwei Bie 1241e4ee513STiwei Bieconfig NR_CPUS 1251e4ee513STiwei Bie int "Maximum number of CPUs" if SMP 1261e4ee513STiwei Bie range NR_CPUS_RANGE_BEGIN NR_CPUS_RANGE_END 1271e4ee513STiwei Bie default NR_CPUS_DEFAULT 128f163977dSChristoph Hellwig 12979b05c1fSChristoph Hellwigsource "arch/$(HEADER_ARCH)/um/Kconfig" 130f163977dSChristoph Hellwig 131730586ffSIgnat Korchaginconfig MAY_HAVE_RUNTIME_DEPS 13233631793SBrendan Higgins bool 13333631793SBrendan Higgins 134f163977dSChristoph Hellwigconfig STATIC_LINK 135f163977dSChristoph Hellwig bool "Force a static link" 13648a858e0SMasahiro Yamada depends on !MAY_HAVE_RUNTIME_DEPS 137f163977dSChristoph Hellwig help 138f163977dSChristoph Hellwig This option gives you the ability to force a static link of UML. 139f163977dSChristoph Hellwig Normally, UML is linked as a shared binary. This is inconvenient for 140f163977dSChristoph Hellwig use in a chroot jail. So, if you intend to run UML inside a chroot, 141f163977dSChristoph Hellwig you probably want to say Y here. 142f163977dSChristoph Hellwig Additionally, this option enables using higher memory spaces (up to 143f163977dSChristoph Hellwig 2.75G) for UML. 144f163977dSChristoph Hellwig 14533631793SBrendan Higgins NOTE: This option is incompatible with some networking features which 14633631793SBrendan Higgins depend on features that require being dynamically loaded (like NSS). 14733631793SBrendan Higgins 148f163977dSChristoph Hellwigconfig LD_SCRIPT_STATIC 149f163977dSChristoph Hellwig bool 150f163977dSChristoph Hellwig default y 151f163977dSChristoph Hellwig depends on STATIC_LINK 152f163977dSChristoph Hellwig 153f163977dSChristoph Hellwigconfig LD_SCRIPT_DYN 154f163977dSChristoph Hellwig bool 155f163977dSChristoph Hellwig default y 156f163977dSChristoph Hellwig depends on !LD_SCRIPT_STATIC 157f163977dSChristoph Hellwig 158386093c6SJohannes Bergconfig LD_SCRIPT_DYN_RPATH 159386093c6SJohannes Berg bool "set rpath in the binary" if EXPERT 160386093c6SJohannes Berg default y 161386093c6SJohannes Berg depends on LD_SCRIPT_DYN 162386093c6SJohannes Berg help 163386093c6SJohannes Berg Add /lib (and /lib64 for 64-bit) to the linux binary's rpath 164386093c6SJohannes Berg explicitly. 165386093c6SJohannes Berg 166386093c6SJohannes Berg You may need to turn this off if compiling for nix systems 167386093c6SJohannes Berg that have their libraries in random /nix directories and 168386093c6SJohannes Berg might otherwise unexpected use libraries from /lib or /lib64 169386093c6SJohannes Berg instead of the desired ones. 170386093c6SJohannes Berg 171f163977dSChristoph Hellwigconfig HOSTFS 172f163977dSChristoph Hellwig tristate "Host filesystem" 173f163977dSChristoph Hellwig help 174f163977dSChristoph Hellwig While the User-Mode Linux port uses its own root file system for 175f163977dSChristoph Hellwig booting and normal file access, this module lets the UML user 176f163977dSChristoph Hellwig access files stored on the host. It does not require any 177f163977dSChristoph Hellwig network connection between the Host and UML. An example use of 178f163977dSChristoph Hellwig this might be: 179f163977dSChristoph Hellwig 180f163977dSChristoph Hellwig mount none /tmp/fromhost -t hostfs -o /tmp/umlshare 181f163977dSChristoph Hellwig 182f163977dSChristoph Hellwig where /tmp/fromhost is an empty directory inside UML and 183f163977dSChristoph Hellwig /tmp/umlshare is a directory on the host with files the UML user 184f163977dSChristoph Hellwig wishes to access. 185f163977dSChristoph Hellwig 186f163977dSChristoph Hellwig For more information, see 187f163977dSChristoph Hellwig <http://user-mode-linux.sourceforge.net/hostfs.html>. 188f163977dSChristoph Hellwig 189f163977dSChristoph Hellwig If you'd like to be able to work with files stored on the host, 190f163977dSChristoph Hellwig say Y or M here; otherwise say N. 191f163977dSChristoph Hellwig 192f163977dSChristoph Hellwigconfig MCONSOLE 193f163977dSChristoph Hellwig bool "Management console" 194f163977dSChristoph Hellwig depends on PROC_FS 195f163977dSChristoph Hellwig default y 196f163977dSChristoph Hellwig help 197f163977dSChristoph Hellwig The user mode linux management console is a low-level interface to 198f163977dSChristoph Hellwig the kernel, somewhat like the i386 SysRq interface. Since there is 199f163977dSChristoph Hellwig a full-blown operating system running under every user mode linux 200f163977dSChristoph Hellwig instance, there is much greater flexibility possible than with the 201f163977dSChristoph Hellwig SysRq mechanism. 202f163977dSChristoph Hellwig 203f163977dSChristoph Hellwig If you answer 'Y' to this option, to use this feature, you need the 204f163977dSChristoph Hellwig mconsole client (called uml_mconsole) which is present in CVS in 205f163977dSChristoph Hellwig 2.4.5-9um and later (path /tools/mconsole), and is also in the 206f163977dSChristoph Hellwig distribution RPM package in 2.4.6 and later. 207f163977dSChristoph Hellwig 208f163977dSChristoph Hellwig It is safe to say 'Y' here. 209f163977dSChristoph Hellwig 210f163977dSChristoph Hellwigconfig MAGIC_SYSRQ 211f163977dSChristoph Hellwig bool "Magic SysRq key" 212f163977dSChristoph Hellwig depends on MCONSOLE 213f163977dSChristoph Hellwig help 214f163977dSChristoph Hellwig If you say Y here, you will have some control over the system even 215f163977dSChristoph Hellwig if the system crashes for example during kernel debugging (e.g., you 216f163977dSChristoph Hellwig will be able to flush the buffer cache to disk, reboot the system 217f163977dSChristoph Hellwig immediately or dump some status information). A key for each of the 218f163977dSChristoph Hellwig possible requests is provided. 219f163977dSChristoph Hellwig 220f163977dSChristoph Hellwig This is the feature normally accomplished by pressing a key 221f163977dSChristoph Hellwig while holding SysRq (Alt+PrintScreen). 222f163977dSChristoph Hellwig 223f163977dSChristoph Hellwig On UML, this is accomplished by sending a "sysrq" command with 224f163977dSChristoph Hellwig mconsole, followed by the letter for the requested command. 225f163977dSChristoph Hellwig 226f163977dSChristoph Hellwig The keys are documented in <file:Documentation/admin-guide/sysrq.rst>. Don't say Y 227f163977dSChristoph Hellwig unless you really know what this hack does. 228f163977dSChristoph Hellwig 229f163977dSChristoph Hellwigconfig KERNEL_STACK_ORDER 230f163977dSChristoph Hellwig int "Kernel stack size order" 2315c2ffce1SAnton Ivanov default 2 if 64BIT 2325c2ffce1SAnton Ivanov range 2 10 if 64BIT 2335c2ffce1SAnton Ivanov default 1 if !64BIT 234f163977dSChristoph Hellwig help 235f163977dSChristoph Hellwig This option determines the size of UML kernel stacks. They will 236f163977dSChristoph Hellwig be 1 << order pages. The default is OK unless you're running Valgrind 237f163977dSChristoph Hellwig on UML, in which case, set this to 3. 2385c2ffce1SAnton Ivanov It is possible to reduce the stack to 1 for 64BIT and 0 for 32BIT on 2395c2ffce1SAnton Ivanov older (pre-2017) CPUs. It is not recommended on newer CPUs due to the 2405c2ffce1SAnton Ivanov increase in the size of the state which needs to be saved when handling 2415c2ffce1SAnton Ivanov signals. 242f163977dSChristoph Hellwig 243f163977dSChristoph Hellwigconfig PGTABLE_LEVELS 244f163977dSChristoph Hellwig int 24541ab5fe7SBenjamin Berg default 4 if 64BIT 24641ab5fe7SBenjamin Berg default 2 if !64BIT 247f163977dSChristoph Hellwig 24806503870SJohannes Bergconfig UML_TIME_TRAVEL_SUPPORT 24906503870SJohannes Berg bool 25006503870SJohannes Berg prompt "Support time-travel mode (e.g. for test execution)" 251d65197adSJohannes Berg # inf-cpu mode is incompatible with the benchmarking 252d65197adSJohannes Berg depends on !RAID6_PQ_BENCHMARK 2534b786e24SJohannes Berg depends on !SMP 25406503870SJohannes Berg help 25506503870SJohannes Berg Enable this option to support time travel inside the UML instance. 25606503870SJohannes Berg 25706503870SJohannes Berg After enabling this option, two modes are accessible at runtime 25806503870SJohannes Berg (selected by the kernel command line), see the kernel's command- 25906503870SJohannes Berg line help for more details. 26006503870SJohannes Berg 26106503870SJohannes Berg It is safe to say Y, but you probably don't need this. 26206503870SJohannes Berg 2630b8b2668SBenjamin Bergconfig UML_MAX_USERSPACE_ITERATIONS 2640b8b2668SBenjamin Berg int 2650b8b2668SBenjamin Berg prompt "Maximum number of unscheduled userspace iterations" 2660b8b2668SBenjamin Berg default 10000 2670b8b2668SBenjamin Berg depends on UML_TIME_TRAVEL_SUPPORT 2680b8b2668SBenjamin Berg help 2690b8b2668SBenjamin Berg In UML inf-cpu and ext time-travel mode userspace can run without being 2700b8b2668SBenjamin Berg interrupted. This will eventually overwhelm the kernel and create OOM 2710b8b2668SBenjamin Berg situations (mainly RCU not running). This setting specifies the number 2720b8b2668SBenjamin Berg of kernel/userspace switches (minor/major page fault, signal or syscall) 2730b8b2668SBenjamin Berg for the same userspace thread before the sched_clock is advanced by a 2740b8b2668SBenjamin Berg jiffie to trigger scheduling. 2750b8b2668SBenjamin Berg 2760b8b2668SBenjamin Berg Setting it to zero disables the feature. 2770b8b2668SBenjamin Berg 2785b301409SPatricia Alfonsoconfig KASAN_SHADOW_OFFSET 2795b301409SPatricia Alfonso hex 2805b301409SPatricia Alfonso depends on KASAN 2815b301409SPatricia Alfonso default 0x100000000000 2825b301409SPatricia Alfonso help 2835b301409SPatricia Alfonso This is the offset at which the ~16TB of shadow memory is 2845b301409SPatricia Alfonso mapped and used by KASAN for memory debugging. This can be any 2855b301409SPatricia Alfonso address that has at least KASAN_SHADOW_SIZE (total address space divided 2865b301409SPatricia Alfonso by 8) amount of space so that the KASAN shadow memory does not conflict 2875b301409SPatricia Alfonso with anything. The default is 0x100000000000, which works even if mem is 2885b301409SPatricia Alfonso set to a large value. On low-memory systems, try 0x7fff8000, as it fits 2895b301409SPatricia Alfonso into the immediate of most instructions, improving performance. 2905b301409SPatricia Alfonso 291f163977dSChristoph Hellwigendmenu 292f163977dSChristoph Hellwig 2939bea1801SChristoph Hellwigsource "arch/um/drivers/Kconfig" 29492dcd3d3SJohannes Berg 29592dcd3d3SJohannes Bergconfig ARCH_SUSPEND_POSSIBLE 29692dcd3d3SJohannes Berg def_bool y 2971e4ee513STiwei Bie depends on !SMP 29892dcd3d3SJohannes Berg 299f09c3fcfSPeter Foleymenu "Power management options" 300f09c3fcfSPeter Foley 30192dcd3d3SJohannes Bergsource "kernel/power/Kconfig" 302f09c3fcfSPeter Foley 303f09c3fcfSPeter Foleyendmenu 304