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