xref: /linux/arch/um/Kconfig (revision 41ab5fe7471ff38d2909d1c93b88197a89c6a00f)
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
89349b5cdSThomas Gleixner	select ARCH_HAS_CPU_FINALIZE_INIT
9ba38961aSKees Cook	select ARCH_HAS_FORTIFY_SOURCE
102419ac32SVincent Whitchurch	select ARCH_HAS_GCOV_PROFILE_ALL
11f163977dSChristoph Hellwig	select ARCH_HAS_KCOV
12e6226997SArnd Bergmann	select ARCH_HAS_STRNCPY_FROM_USER
13e6226997SArnd Bergmann	select ARCH_HAS_STRNLEN_USER
14f163977dSChristoph Hellwig	select HAVE_ARCH_AUDITSYSCALL
155b301409SPatricia Alfonso	select HAVE_ARCH_KASAN if X86_64
165b301409SPatricia Alfonso	select HAVE_ARCH_KASAN_VMALLOC if HAVE_ARCH_KASAN
17f163977dSChristoph Hellwig	select HAVE_ARCH_SECCOMP_FILTER
182ff2b7ecSMasahiro Yamada	select HAVE_ASM_MODVERSIONS
19f163977dSChristoph Hellwig	select HAVE_UID16
20f163977dSChristoph Hellwig	select HAVE_DEBUG_KMEMLEAK
210d76433cSHernán Gonzalez	select HAVE_DEBUG_BUGVERBOSE
225394f1e9SArnd Bergmann	select HAVE_PAGE_SIZE_4KB
2368f5d3f3SJohannes Berg	select NO_DMA if !UML_DMA_EMULATION
24b31297f0SVincent Whitchurch	select OF_EARLY_FLATTREE if OF
25f163977dSChristoph Hellwig	select GENERIC_IRQ_SHOW
26f163977dSChristoph Hellwig	select GENERIC_CPU_DEVICES
27f163977dSChristoph Hellwig	select HAVE_GCC_PLUGINS
2883e913f5SPeter Foley	select ARCH_SUPPORTS_LTO_CLANG
2983e913f5SPeter Foley	select ARCH_SUPPORTS_LTO_CLANG_THIN
304aae683fSMasahiro Yamada	select TRACE_IRQFLAGS_SUPPORT
31f163977dSChristoph Hellwig	select TTY # Needed for line.c
32bc5c49d7SJohannes Berg	select HAVE_ARCH_VMAP_STACK
33ab0f4cedSDavid Gow	select HAVE_RUST
3453585f9eSJohannes Berg	select ARCH_HAS_UBSAN
35f163977dSChristoph Hellwig
36f163977dSChristoph Hellwigconfig MMU
37f163977dSChristoph Hellwig	bool
38f163977dSChristoph Hellwig	default y
39f163977dSChristoph Hellwig
4068f5d3f3SJohannes Bergconfig UML_DMA_EMULATION
4168f5d3f3SJohannes Berg	bool
4268f5d3f3SJohannes Berg
43f163977dSChristoph Hellwigconfig NO_IOMEM
440bbadafdSJohannes Berg	bool "disable IOMEM" if EXPERT
4568f5d3f3SJohannes Berg	depends on !INDIRECT_IOMEM
460bbadafdSJohannes Berg	default y
470bbadafdSJohannes Berg
4868f5d3f3SJohannes Bergconfig UML_IOMEM_EMULATION
4968f5d3f3SJohannes Berg	bool
5068f5d3f3SJohannes Berg	select INDIRECT_IOMEM
51ddd268c4SNiklas Schnelle	select HAS_IOPORT
5268f5d3f3SJohannes Berg	select GENERIC_PCI_IOMAP
5368f5d3f3SJohannes Berg	select GENERIC_IOMAP
5468f5d3f3SJohannes Berg	select NO_GENERIC_PCI_IOPORT_MAP
5568f5d3f3SJohannes Berg
560bbadafdSJohannes Bergconfig NO_IOPORT_MAP
57ddd268c4SNiklas Schnelle	def_bool !UML_IOMEM_EMULATION
58f163977dSChristoph Hellwig
59f163977dSChristoph Hellwigconfig ISA
60f163977dSChristoph Hellwig	bool
61f163977dSChristoph Hellwig
62f163977dSChristoph Hellwigconfig SBUS
63f163977dSChristoph Hellwig	bool
64f163977dSChristoph Hellwig
65f163977dSChristoph Hellwigconfig LOCKDEP_SUPPORT
66f163977dSChristoph Hellwig	bool
67f163977dSChristoph Hellwig	default y
68f163977dSChristoph Hellwig
69f163977dSChristoph Hellwigconfig STACKTRACE_SUPPORT
70f163977dSChristoph Hellwig	bool
71f163977dSChristoph Hellwig	default y
72f163977dSChristoph Hellwig	select STACKTRACE
73f163977dSChristoph Hellwig
74f163977dSChristoph Hellwigconfig GENERIC_CALIBRATE_DELAY
75f163977dSChristoph Hellwig	bool
76f163977dSChristoph Hellwig	default y
77f163977dSChristoph Hellwig
78f163977dSChristoph Hellwigconfig HZ
79f163977dSChristoph Hellwig	int
80f163977dSChristoph Hellwig	default 100
81f163977dSChristoph Hellwig
82f163977dSChristoph Hellwigconfig NR_CPUS
83f163977dSChristoph Hellwig	int
84f163977dSChristoph Hellwig	range 1 1
85f163977dSChristoph Hellwig	default 1
86f163977dSChristoph Hellwig
87d8fb32f4SAnton Ivanovconfig ARCH_HAS_CACHE_LINE_SIZE
88d8fb32f4SAnton Ivanov	def_bool y
89d8fb32f4SAnton Ivanov
9079b05c1fSChristoph Hellwigsource "arch/$(HEADER_ARCH)/um/Kconfig"
91f163977dSChristoph Hellwig
92730586ffSIgnat Korchaginconfig MAY_HAVE_RUNTIME_DEPS
9333631793SBrendan Higgins	bool
9433631793SBrendan Higgins
95f163977dSChristoph Hellwigconfig STATIC_LINK
96f163977dSChristoph Hellwig	bool "Force a static link"
9748a858e0SMasahiro Yamada	depends on !MAY_HAVE_RUNTIME_DEPS
98f163977dSChristoph Hellwig	help
99f163977dSChristoph Hellwig	  This option gives you the ability to force a static link of UML.
100f163977dSChristoph Hellwig	  Normally, UML is linked as a shared binary.  This is inconvenient for
101f163977dSChristoph Hellwig	  use in a chroot jail.  So, if you intend to run UML inside a chroot,
102f163977dSChristoph Hellwig	  you probably want to say Y here.
103f163977dSChristoph Hellwig	  Additionally, this option enables using higher memory spaces (up to
104f163977dSChristoph Hellwig	  2.75G) for UML.
105f163977dSChristoph Hellwig
10633631793SBrendan Higgins	  NOTE: This option is incompatible with some networking features which
10733631793SBrendan Higgins	  depend on features that require being dynamically loaded (like NSS).
10833631793SBrendan Higgins
109f163977dSChristoph Hellwigconfig LD_SCRIPT_STATIC
110f163977dSChristoph Hellwig	bool
111f163977dSChristoph Hellwig	default y
112f163977dSChristoph Hellwig	depends on STATIC_LINK
113f163977dSChristoph Hellwig
114f163977dSChristoph Hellwigconfig LD_SCRIPT_DYN
115f163977dSChristoph Hellwig	bool
116f163977dSChristoph Hellwig	default y
117f163977dSChristoph Hellwig	depends on !LD_SCRIPT_STATIC
118f163977dSChristoph Hellwig
119386093c6SJohannes Bergconfig LD_SCRIPT_DYN_RPATH
120386093c6SJohannes Berg	bool "set rpath in the binary" if EXPERT
121386093c6SJohannes Berg	default y
122386093c6SJohannes Berg	depends on LD_SCRIPT_DYN
123386093c6SJohannes Berg	help
124386093c6SJohannes Berg	  Add /lib (and /lib64 for 64-bit) to the linux binary's rpath
125386093c6SJohannes Berg	  explicitly.
126386093c6SJohannes Berg
127386093c6SJohannes Berg	  You may need to turn this off if compiling for nix systems
128386093c6SJohannes Berg	  that have their libraries in random /nix directories and
129386093c6SJohannes Berg	  might otherwise unexpected use libraries from /lib or /lib64
130386093c6SJohannes Berg	  instead of the desired ones.
131386093c6SJohannes Berg
132f163977dSChristoph Hellwigconfig HOSTFS
133f163977dSChristoph Hellwig	tristate "Host filesystem"
134f163977dSChristoph Hellwig	help
135f163977dSChristoph Hellwig	  While the User-Mode Linux port uses its own root file system for
136f163977dSChristoph Hellwig	  booting and normal file access, this module lets the UML user
137f163977dSChristoph Hellwig	  access files stored on the host.  It does not require any
138f163977dSChristoph Hellwig	  network connection between the Host and UML.  An example use of
139f163977dSChristoph Hellwig	  this might be:
140f163977dSChristoph Hellwig
141f163977dSChristoph Hellwig	  mount none /tmp/fromhost -t hostfs -o /tmp/umlshare
142f163977dSChristoph Hellwig
143f163977dSChristoph Hellwig	  where /tmp/fromhost is an empty directory inside UML and
144f163977dSChristoph Hellwig	  /tmp/umlshare is a directory on the host with files the UML user
145f163977dSChristoph Hellwig	  wishes to access.
146f163977dSChristoph Hellwig
147f163977dSChristoph Hellwig	  For more information, see
148f163977dSChristoph Hellwig	  <http://user-mode-linux.sourceforge.net/hostfs.html>.
149f163977dSChristoph Hellwig
150f163977dSChristoph Hellwig	  If you'd like to be able to work with files stored on the host,
151f163977dSChristoph Hellwig	  say Y or M here; otherwise say N.
152f163977dSChristoph Hellwig
153f163977dSChristoph Hellwigconfig MCONSOLE
154f163977dSChristoph Hellwig	bool "Management console"
155f163977dSChristoph Hellwig	depends on PROC_FS
156f163977dSChristoph Hellwig	default y
157f163977dSChristoph Hellwig	help
158f163977dSChristoph Hellwig	  The user mode linux management console is a low-level interface to
159f163977dSChristoph Hellwig	  the kernel, somewhat like the i386 SysRq interface.  Since there is
160f163977dSChristoph Hellwig	  a full-blown operating system running under every user mode linux
161f163977dSChristoph Hellwig	  instance, there is much greater flexibility possible than with the
162f163977dSChristoph Hellwig	  SysRq mechanism.
163f163977dSChristoph Hellwig
164f163977dSChristoph Hellwig	  If you answer 'Y' to this option, to use this feature, you need the
165f163977dSChristoph Hellwig	  mconsole client (called uml_mconsole) which is present in CVS in
166f163977dSChristoph Hellwig	  2.4.5-9um and later (path /tools/mconsole), and is also in the
167f163977dSChristoph Hellwig	  distribution RPM package in 2.4.6 and later.
168f163977dSChristoph Hellwig
169f163977dSChristoph Hellwig	  It is safe to say 'Y' here.
170f163977dSChristoph Hellwig
171f163977dSChristoph Hellwigconfig MAGIC_SYSRQ
172f163977dSChristoph Hellwig	bool "Magic SysRq key"
173f163977dSChristoph Hellwig	depends on MCONSOLE
174f163977dSChristoph Hellwig	help
175f163977dSChristoph Hellwig	  If you say Y here, you will have some control over the system even
176f163977dSChristoph Hellwig	  if the system crashes for example during kernel debugging (e.g., you
177f163977dSChristoph Hellwig	  will be able to flush the buffer cache to disk, reboot the system
178f163977dSChristoph Hellwig	  immediately or dump some status information). A key for each of the
179f163977dSChristoph Hellwig	  possible requests is provided.
180f163977dSChristoph Hellwig
181f163977dSChristoph Hellwig	  This is the feature normally accomplished by pressing a key
182f163977dSChristoph Hellwig	  while holding SysRq (Alt+PrintScreen).
183f163977dSChristoph Hellwig
184f163977dSChristoph Hellwig	  On UML, this is accomplished by sending a "sysrq" command with
185f163977dSChristoph Hellwig	  mconsole, followed by the letter for the requested command.
186f163977dSChristoph Hellwig
187f163977dSChristoph Hellwig	  The keys are documented in <file:Documentation/admin-guide/sysrq.rst>. Don't say Y
188f163977dSChristoph Hellwig	  unless you really know what this hack does.
189f163977dSChristoph Hellwig
190f163977dSChristoph Hellwigconfig KERNEL_STACK_ORDER
191f163977dSChristoph Hellwig	int "Kernel stack size order"
1925c2ffce1SAnton Ivanov	default 2 if 64BIT
1935c2ffce1SAnton Ivanov	range 2 10 if 64BIT
1945c2ffce1SAnton Ivanov	default 1 if !64BIT
195f163977dSChristoph Hellwig	help
196f163977dSChristoph Hellwig	  This option determines the size of UML kernel stacks.  They will
197f163977dSChristoph Hellwig	  be 1 << order pages.  The default is OK unless you're running Valgrind
198f163977dSChristoph Hellwig	  on UML, in which case, set this to 3.
1995c2ffce1SAnton Ivanov	  It is possible to reduce the stack to 1 for 64BIT and 0 for 32BIT on
2005c2ffce1SAnton Ivanov	  older (pre-2017) CPUs. It is not recommended on newer CPUs due to the
2015c2ffce1SAnton Ivanov	  increase in the size of the state which needs to be saved when handling
2025c2ffce1SAnton Ivanov	  signals.
203f163977dSChristoph Hellwig
204f163977dSChristoph Hellwigconfig MMAPPER
205f163977dSChristoph Hellwig	tristate "iomem emulation driver"
206f163977dSChristoph Hellwig	help
207f163977dSChristoph Hellwig	  This driver allows a host file to be used as emulated IO memory inside
208f163977dSChristoph Hellwig	  UML.
209f163977dSChristoph Hellwig
210f163977dSChristoph Hellwigconfig PGTABLE_LEVELS
211f163977dSChristoph Hellwig	int
212*41ab5fe7SBenjamin Berg	default 4 if 64BIT
213*41ab5fe7SBenjamin Berg	default 2 if !64BIT
214f163977dSChristoph Hellwig
21506503870SJohannes Bergconfig UML_TIME_TRAVEL_SUPPORT
21606503870SJohannes Berg	bool
21706503870SJohannes Berg	prompt "Support time-travel mode (e.g. for test execution)"
218d65197adSJohannes Berg	# inf-cpu mode is incompatible with the benchmarking
219d65197adSJohannes Berg	depends on !RAID6_PQ_BENCHMARK
2204b786e24SJohannes Berg	depends on !SMP
22106503870SJohannes Berg	help
22206503870SJohannes Berg	  Enable this option to support time travel inside the UML instance.
22306503870SJohannes Berg
22406503870SJohannes Berg	  After enabling this option, two modes are accessible at runtime
22506503870SJohannes Berg	  (selected by the kernel command line), see the kernel's command-
22606503870SJohannes Berg	  line help for more details.
22706503870SJohannes Berg
22806503870SJohannes Berg	  It is safe to say Y, but you probably don't need this.
22906503870SJohannes Berg
2305b301409SPatricia Alfonsoconfig KASAN_SHADOW_OFFSET
2315b301409SPatricia Alfonso	hex
2325b301409SPatricia Alfonso	depends on KASAN
2335b301409SPatricia Alfonso	default 0x100000000000
2345b301409SPatricia Alfonso	help
2355b301409SPatricia Alfonso	  This is the offset at which the ~16TB of shadow memory is
2365b301409SPatricia Alfonso	  mapped and used by KASAN for memory debugging. This can be any
2375b301409SPatricia Alfonso	  address that has at least KASAN_SHADOW_SIZE (total address space divided
2385b301409SPatricia Alfonso	  by 8) amount of space so that the KASAN shadow memory does not conflict
2395b301409SPatricia Alfonso	  with anything. The default is 0x100000000000, which works even if mem is
2405b301409SPatricia Alfonso	  set to a large value. On low-memory systems, try 0x7fff8000, as it fits
2415b301409SPatricia Alfonso	  into the immediate of most instructions, improving performance.
2425b301409SPatricia Alfonso
243f163977dSChristoph Hellwigendmenu
244f163977dSChristoph Hellwig
2459bea1801SChristoph Hellwigsource "arch/um/drivers/Kconfig"
24692dcd3d3SJohannes Berg
24792dcd3d3SJohannes Bergconfig ARCH_SUSPEND_POSSIBLE
24892dcd3d3SJohannes Berg	def_bool y
24992dcd3d3SJohannes Berg
250f09c3fcfSPeter Foleymenu "Power management options"
251f09c3fcfSPeter Foley
25292dcd3d3SJohannes Bergsource "kernel/power/Kconfig"
253f09c3fcfSPeter Foley
254f09c3fcfSPeter Foleyendmenu
255