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