xref: /OK3568_Linux_fs/kernel/arch/um/Kconfig (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0
2*4882a593Smuzhiyun
3*4882a593Smuzhiyunmenu "UML-specific options"
4*4882a593Smuzhiyun
5*4882a593Smuzhiyunconfig UML
6*4882a593Smuzhiyun	bool
7*4882a593Smuzhiyun	default y
8*4882a593Smuzhiyun	select ARCH_HAS_KCOV
9*4882a593Smuzhiyun	select ARCH_NO_PREEMPT
10*4882a593Smuzhiyun	select HAVE_ARCH_AUDITSYSCALL
11*4882a593Smuzhiyun	select HAVE_ARCH_SECCOMP_FILTER
12*4882a593Smuzhiyun	select HAVE_ASM_MODVERSIONS
13*4882a593Smuzhiyun	select HAVE_UID16
14*4882a593Smuzhiyun	select HAVE_FUTEX_CMPXCHG if FUTEX
15*4882a593Smuzhiyun	select HAVE_DEBUG_KMEMLEAK
16*4882a593Smuzhiyun	select HAVE_DEBUG_BUGVERBOSE
17*4882a593Smuzhiyun	select NO_DMA
18*4882a593Smuzhiyun	select GENERIC_IRQ_SHOW
19*4882a593Smuzhiyun	select GENERIC_CPU_DEVICES
20*4882a593Smuzhiyun	select GENERIC_CLOCKEVENTS
21*4882a593Smuzhiyun	select HAVE_GCC_PLUGINS
22*4882a593Smuzhiyun	select SET_FS
23*4882a593Smuzhiyun	select TTY # Needed for line.c
24*4882a593Smuzhiyun
25*4882a593Smuzhiyunconfig MMU
26*4882a593Smuzhiyun	bool
27*4882a593Smuzhiyun	default y
28*4882a593Smuzhiyun
29*4882a593Smuzhiyunconfig NO_IOMEM
30*4882a593Smuzhiyun	def_bool y
31*4882a593Smuzhiyun
32*4882a593Smuzhiyunconfig ISA
33*4882a593Smuzhiyun	bool
34*4882a593Smuzhiyun
35*4882a593Smuzhiyunconfig SBUS
36*4882a593Smuzhiyun	bool
37*4882a593Smuzhiyun
38*4882a593Smuzhiyunconfig TRACE_IRQFLAGS_SUPPORT
39*4882a593Smuzhiyun	bool
40*4882a593Smuzhiyun	default y
41*4882a593Smuzhiyun
42*4882a593Smuzhiyunconfig LOCKDEP_SUPPORT
43*4882a593Smuzhiyun	bool
44*4882a593Smuzhiyun	default y
45*4882a593Smuzhiyun
46*4882a593Smuzhiyunconfig STACKTRACE_SUPPORT
47*4882a593Smuzhiyun	bool
48*4882a593Smuzhiyun	default y
49*4882a593Smuzhiyun	select STACKTRACE
50*4882a593Smuzhiyun
51*4882a593Smuzhiyunconfig GENERIC_CALIBRATE_DELAY
52*4882a593Smuzhiyun	bool
53*4882a593Smuzhiyun	default y
54*4882a593Smuzhiyun
55*4882a593Smuzhiyunconfig HZ
56*4882a593Smuzhiyun	int
57*4882a593Smuzhiyun	default 100
58*4882a593Smuzhiyun
59*4882a593Smuzhiyunconfig NR_CPUS
60*4882a593Smuzhiyun	int
61*4882a593Smuzhiyun	range 1 1
62*4882a593Smuzhiyun	default 1
63*4882a593Smuzhiyun
64*4882a593Smuzhiyunsource "arch/$(HEADER_ARCH)/um/Kconfig"
65*4882a593Smuzhiyun
66*4882a593Smuzhiyunconfig MAY_HAVE_RUNTIME_DEPS
67*4882a593Smuzhiyun        bool
68*4882a593Smuzhiyun
69*4882a593Smuzhiyunconfig STATIC_LINK
70*4882a593Smuzhiyun	bool "Force a static link"
71*4882a593Smuzhiyun	depends on CC_CAN_LINK_STATIC_NO_RUNTIME_DEPS || !MAY_HAVE_RUNTIME_DEPS
72*4882a593Smuzhiyun	help
73*4882a593Smuzhiyun	  This option gives you the ability to force a static link of UML.
74*4882a593Smuzhiyun	  Normally, UML is linked as a shared binary.  This is inconvenient for
75*4882a593Smuzhiyun	  use in a chroot jail.  So, if you intend to run UML inside a chroot,
76*4882a593Smuzhiyun	  you probably want to say Y here.
77*4882a593Smuzhiyun	  Additionally, this option enables using higher memory spaces (up to
78*4882a593Smuzhiyun	  2.75G) for UML.
79*4882a593Smuzhiyun
80*4882a593Smuzhiyun	  NOTE: This option is incompatible with some networking features which
81*4882a593Smuzhiyun	  depend on features that require being dynamically loaded (like NSS).
82*4882a593Smuzhiyun
83*4882a593Smuzhiyunconfig LD_SCRIPT_STATIC
84*4882a593Smuzhiyun	bool
85*4882a593Smuzhiyun	default y
86*4882a593Smuzhiyun	depends on STATIC_LINK
87*4882a593Smuzhiyun
88*4882a593Smuzhiyunconfig LD_SCRIPT_DYN
89*4882a593Smuzhiyun	bool
90*4882a593Smuzhiyun	default y
91*4882a593Smuzhiyun	depends on !LD_SCRIPT_STATIC
92*4882a593Smuzhiyun	select MODULE_REL_CRCS if MODVERSIONS
93*4882a593Smuzhiyun
94*4882a593Smuzhiyunconfig HOSTFS
95*4882a593Smuzhiyun	tristate "Host filesystem"
96*4882a593Smuzhiyun	help
97*4882a593Smuzhiyun	  While the User-Mode Linux port uses its own root file system for
98*4882a593Smuzhiyun	  booting and normal file access, this module lets the UML user
99*4882a593Smuzhiyun	  access files stored on the host.  It does not require any
100*4882a593Smuzhiyun	  network connection between the Host and UML.  An example use of
101*4882a593Smuzhiyun	  this might be:
102*4882a593Smuzhiyun
103*4882a593Smuzhiyun	  mount none /tmp/fromhost -t hostfs -o /tmp/umlshare
104*4882a593Smuzhiyun
105*4882a593Smuzhiyun	  where /tmp/fromhost is an empty directory inside UML and
106*4882a593Smuzhiyun	  /tmp/umlshare is a directory on the host with files the UML user
107*4882a593Smuzhiyun	  wishes to access.
108*4882a593Smuzhiyun
109*4882a593Smuzhiyun	  For more information, see
110*4882a593Smuzhiyun	  <http://user-mode-linux.sourceforge.net/hostfs.html>.
111*4882a593Smuzhiyun
112*4882a593Smuzhiyun	  If you'd like to be able to work with files stored on the host,
113*4882a593Smuzhiyun	  say Y or M here; otherwise say N.
114*4882a593Smuzhiyun
115*4882a593Smuzhiyunconfig MCONSOLE
116*4882a593Smuzhiyun	bool "Management console"
117*4882a593Smuzhiyun	depends on PROC_FS
118*4882a593Smuzhiyun	default y
119*4882a593Smuzhiyun	help
120*4882a593Smuzhiyun	  The user mode linux management console is a low-level interface to
121*4882a593Smuzhiyun	  the kernel, somewhat like the i386 SysRq interface.  Since there is
122*4882a593Smuzhiyun	  a full-blown operating system running under every user mode linux
123*4882a593Smuzhiyun	  instance, there is much greater flexibility possible than with the
124*4882a593Smuzhiyun	  SysRq mechanism.
125*4882a593Smuzhiyun
126*4882a593Smuzhiyun	  If you answer 'Y' to this option, to use this feature, you need the
127*4882a593Smuzhiyun	  mconsole client (called uml_mconsole) which is present in CVS in
128*4882a593Smuzhiyun	  2.4.5-9um and later (path /tools/mconsole), and is also in the
129*4882a593Smuzhiyun	  distribution RPM package in 2.4.6 and later.
130*4882a593Smuzhiyun
131*4882a593Smuzhiyun	  It is safe to say 'Y' here.
132*4882a593Smuzhiyun
133*4882a593Smuzhiyunconfig MAGIC_SYSRQ
134*4882a593Smuzhiyun	bool "Magic SysRq key"
135*4882a593Smuzhiyun	depends on MCONSOLE
136*4882a593Smuzhiyun	help
137*4882a593Smuzhiyun	  If you say Y here, you will have some control over the system even
138*4882a593Smuzhiyun	  if the system crashes for example during kernel debugging (e.g., you
139*4882a593Smuzhiyun	  will be able to flush the buffer cache to disk, reboot the system
140*4882a593Smuzhiyun	  immediately or dump some status information). A key for each of the
141*4882a593Smuzhiyun	  possible requests is provided.
142*4882a593Smuzhiyun
143*4882a593Smuzhiyun	  This is the feature normally accomplished by pressing a key
144*4882a593Smuzhiyun	  while holding SysRq (Alt+PrintScreen).
145*4882a593Smuzhiyun
146*4882a593Smuzhiyun	  On UML, this is accomplished by sending a "sysrq" command with
147*4882a593Smuzhiyun	  mconsole, followed by the letter for the requested command.
148*4882a593Smuzhiyun
149*4882a593Smuzhiyun	  The keys are documented in <file:Documentation/admin-guide/sysrq.rst>. Don't say Y
150*4882a593Smuzhiyun	  unless you really know what this hack does.
151*4882a593Smuzhiyun
152*4882a593Smuzhiyunconfig KERNEL_STACK_ORDER
153*4882a593Smuzhiyun	int "Kernel stack size order"
154*4882a593Smuzhiyun	default 2 if 64BIT
155*4882a593Smuzhiyun	range 2 10 if 64BIT
156*4882a593Smuzhiyun	default 1 if !64BIT
157*4882a593Smuzhiyun	help
158*4882a593Smuzhiyun	  This option determines the size of UML kernel stacks.  They will
159*4882a593Smuzhiyun	  be 1 << order pages.  The default is OK unless you're running Valgrind
160*4882a593Smuzhiyun	  on UML, in which case, set this to 3.
161*4882a593Smuzhiyun	  It is possible to reduce the stack to 1 for 64BIT and 0 for 32BIT on
162*4882a593Smuzhiyun	  older (pre-2017) CPUs. It is not recommended on newer CPUs due to the
163*4882a593Smuzhiyun	  increase in the size of the state which needs to be saved when handling
164*4882a593Smuzhiyun	  signals.
165*4882a593Smuzhiyun
166*4882a593Smuzhiyunconfig MMAPPER
167*4882a593Smuzhiyun	tristate "iomem emulation driver"
168*4882a593Smuzhiyun	help
169*4882a593Smuzhiyun	  This driver allows a host file to be used as emulated IO memory inside
170*4882a593Smuzhiyun	  UML.
171*4882a593Smuzhiyun
172*4882a593Smuzhiyunconfig PGTABLE_LEVELS
173*4882a593Smuzhiyun	int
174*4882a593Smuzhiyun	default 3 if 3_LEVEL_PGTABLES
175*4882a593Smuzhiyun	default 2
176*4882a593Smuzhiyun
177*4882a593Smuzhiyunconfig UML_TIME_TRAVEL_SUPPORT
178*4882a593Smuzhiyun	bool
179*4882a593Smuzhiyun	prompt "Support time-travel mode (e.g. for test execution)"
180*4882a593Smuzhiyun	# inf-cpu mode is incompatible with the benchmarking
181*4882a593Smuzhiyun	depends on !RAID6_PQ_BENCHMARK
182*4882a593Smuzhiyun	depends on !SMP
183*4882a593Smuzhiyun	help
184*4882a593Smuzhiyun	  Enable this option to support time travel inside the UML instance.
185*4882a593Smuzhiyun
186*4882a593Smuzhiyun	  After enabling this option, two modes are accessible at runtime
187*4882a593Smuzhiyun	  (selected by the kernel command line), see the kernel's command-
188*4882a593Smuzhiyun	  line help for more details.
189*4882a593Smuzhiyun
190*4882a593Smuzhiyun	  It is safe to say Y, but you probably don't need this.
191*4882a593Smuzhiyun
192*4882a593Smuzhiyunendmenu
193*4882a593Smuzhiyun
194*4882a593Smuzhiyunsource "arch/um/drivers/Kconfig"
195*4882a593Smuzhiyun
196*4882a593Smuzhiyunconfig ARCH_SUSPEND_POSSIBLE
197*4882a593Smuzhiyun	def_bool y
198*4882a593Smuzhiyun
199*4882a593Smuzhiyunsource "kernel/power/Kconfig"
200