xref: /linux/arch/s390/Kconfig (revision b4efd62564e96d1edb99eb00dd0ff620dbd1afab)
1# SPDX-License-Identifier: GPL-2.0
2config MMU
3	def_bool y
4
5config CPU_BIG_ENDIAN
6	def_bool y
7
8config LOCKDEP_SUPPORT
9	def_bool y
10
11config STACKTRACE_SUPPORT
12	def_bool y
13
14config ARCH_HAS_ILOG2_U32
15	def_bool n
16
17config ARCH_HAS_ILOG2_U64
18	def_bool n
19
20config ARCH_PROC_KCORE_TEXT
21	def_bool y
22
23config GENERIC_HWEIGHT
24	def_bool !HAVE_MARCH_Z196_FEATURES
25
26config GENERIC_BUG
27	def_bool y if BUG
28
29config GENERIC_BUG_RELATIVE_POINTERS
30	def_bool y
31
32config GENERIC_LOCKBREAK
33	def_bool y if PREEMPTION
34
35config PGSTE
36	def_bool y if KVM
37
38config AUDIT_ARCH
39	def_bool y
40
41config NO_IOPORT_MAP
42	def_bool y
43
44config ARCH_SUPPORTS_UPROBES
45	def_bool y
46
47config KASAN_SHADOW_OFFSET
48	hex
49	depends on KASAN
50	default 0x1C000000000000
51
52config CC_ASM_FLAG_OUTPUT_BROKEN
53	def_bool CC_IS_GCC && GCC_VERSION < 140200
54	help
55	  GCC versions before 14.2.0 may die with an internal
56	  compiler error in some configurations if flag output
57	  operands are used within inline assemblies.
58
59config CC_HAS_ASM_AOR_FORMAT_FLAGS
60	def_bool !(CC_IS_CLANG && CLANG_VERSION < 190100)
61	help
62	  Clang versions before 19.1.0 do not support A,
63	  O, and R inline assembly format flags.
64
65config S390
66	def_bool y
67	#
68	# Note: keep this list sorted alphabetically
69	#
70	imply IMA_SECURE_AND_OR_TRUSTED_BOOT
71	select ALTERNATE_USER_ADDRESS_SPACE
72	select ARCH_32BIT_USTAT_F_TINODE
73	select ARCH_CORRECT_STACKTRACE_ON_KRETPROBE
74	select ARCH_ENABLE_MEMORY_HOTPLUG if SPARSEMEM
75	select ARCH_ENABLE_MEMORY_HOTREMOVE
76	select ARCH_ENABLE_SPLIT_PMD_PTLOCK if PGTABLE_LEVELS > 2
77	select ARCH_HAS_CPU_FINALIZE_INIT
78	select ARCH_HAS_CURRENT_STACK_POINTER
79	select ARCH_HAS_DEBUG_VIRTUAL
80	select ARCH_HAS_DEBUG_VM_PGTABLE
81	select ARCH_HAS_DEBUG_WX
82	select ARCH_HAS_DEVMEM_IS_ALLOWED
83	select ARCH_HAS_DMA_OPS if PCI
84	select ARCH_HAS_ELF_RANDOMIZE
85	select ARCH_HAS_FORCE_DMA_UNENCRYPTED
86	select ARCH_HAS_FORTIFY_SOURCE
87	select ARCH_HAS_GCOV_PROFILE_ALL
88	select ARCH_HAS_GIGANTIC_PAGE
89	select ARCH_HAS_KCOV
90	select ARCH_HAS_MEMBARRIER_SYNC_CORE
91	select ARCH_HAS_MEM_ENCRYPT
92	select ARCH_HAS_NMI_SAFE_THIS_CPU_OPS
93	select ARCH_HAS_PREEMPT_LAZY
94	select ARCH_HAS_PTDUMP
95	select ARCH_HAS_PTE_SPECIAL
96	select ARCH_HAS_SCALED_CPUTIME
97	select ARCH_HAS_SET_DIRECT_MAP
98	select ARCH_HAS_SET_MEMORY
99	select ARCH_HAS_STRICT_KERNEL_RWX
100	select ARCH_HAS_STRICT_MODULE_RWX
101	select ARCH_HAS_SYSCALL_WRAPPER
102	select ARCH_HAS_UBSAN
103	select ARCH_HAS_VDSO_TIME_DATA
104	select ARCH_HAVE_NMI_SAFE_CMPXCHG
105	select ARCH_INLINE_READ_LOCK
106	select ARCH_INLINE_READ_LOCK_BH
107	select ARCH_INLINE_READ_LOCK_IRQ
108	select ARCH_INLINE_READ_LOCK_IRQSAVE
109	select ARCH_INLINE_READ_TRYLOCK
110	select ARCH_INLINE_READ_UNLOCK
111	select ARCH_INLINE_READ_UNLOCK_BH
112	select ARCH_INLINE_READ_UNLOCK_IRQ
113	select ARCH_INLINE_READ_UNLOCK_IRQRESTORE
114	select ARCH_INLINE_SPIN_LOCK
115	select ARCH_INLINE_SPIN_LOCK_BH
116	select ARCH_INLINE_SPIN_LOCK_IRQ
117	select ARCH_INLINE_SPIN_LOCK_IRQSAVE
118	select ARCH_INLINE_SPIN_TRYLOCK
119	select ARCH_INLINE_SPIN_TRYLOCK_BH
120	select ARCH_INLINE_SPIN_UNLOCK
121	select ARCH_INLINE_SPIN_UNLOCK_BH
122	select ARCH_INLINE_SPIN_UNLOCK_IRQ
123	select ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE
124	select ARCH_INLINE_WRITE_LOCK
125	select ARCH_INLINE_WRITE_LOCK_BH
126	select ARCH_INLINE_WRITE_LOCK_IRQ
127	select ARCH_INLINE_WRITE_LOCK_IRQSAVE
128	select ARCH_INLINE_WRITE_TRYLOCK
129	select ARCH_INLINE_WRITE_UNLOCK
130	select ARCH_INLINE_WRITE_UNLOCK_BH
131	select ARCH_INLINE_WRITE_UNLOCK_IRQ
132	select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
133	select ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE
134	select ARCH_STACKWALK
135	select ARCH_SUPPORTS_ATOMIC_RMW
136	select ARCH_SUPPORTS_DEBUG_PAGEALLOC
137	select ARCH_SUPPORTS_HUGETLBFS
138	select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 && CC_IS_CLANG
139	select ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS
140	select ARCH_SUPPORTS_NUMA_BALANCING
141	select ARCH_SUPPORTS_PER_VMA_LOCK
142	select ARCH_USE_BUILTIN_BSWAP
143	select ARCH_USE_CMPXCHG_LOCKREF
144	select ARCH_USE_SYM_ANNOTATIONS
145	select ARCH_WANTS_NO_INSTR
146	select ARCH_WANT_DEFAULT_BPF_JIT
147	select ARCH_WANT_IPC_PARSE_VERSION
148	select ARCH_WANT_IRQS_OFF_ACTIVATE_MM
149	select ARCH_WANT_KERNEL_PMD_MKWRITE
150	select ARCH_WANT_LD_ORPHAN_WARN
151	select ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP
152	select BUILDTIME_TABLE_SORT
153	select CLONE_BACKWARDS2
154	select DCACHE_WORD_ACCESS if !KMSAN
155	select DYNAMIC_FTRACE if FUNCTION_TRACER
156	select FUNCTION_ALIGNMENT_8B if CC_IS_GCC
157	select FUNCTION_ALIGNMENT_16B if !CC_IS_GCC
158	select GENERIC_ALLOCATOR
159	select GENERIC_CPU_DEVICES
160	select GENERIC_CPU_AUTOPROBE
161	select GENERIC_CPU_VULNERABILITIES
162	select GENERIC_ENTRY
163	select GENERIC_GETTIMEOFDAY
164	select GENERIC_SMP_IDLE_THREAD
165	select GENERIC_TIME_VSYSCALL
166	select GENERIC_VDSO_DATA_STORE
167	select GENERIC_VDSO_TIME_NS
168	select GENERIC_IOREMAP if PCI
169	select HAVE_ALIGNED_STRUCT_PAGE
170	select HAVE_ARCH_AUDITSYSCALL
171	select HAVE_ARCH_JUMP_LABEL
172	select HAVE_ARCH_JUMP_LABEL_RELATIVE
173	select HAVE_ARCH_KASAN
174	select HAVE_ARCH_KASAN_VMALLOC
175	select HAVE_ARCH_KCSAN
176	select HAVE_ARCH_KMSAN
177	select HAVE_ARCH_KFENCE
178	select HAVE_ARCH_KSTACK_ERASE
179	select HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
180	select HAVE_ARCH_SECCOMP_FILTER
181	select HAVE_ARCH_SOFT_DIRTY
182	select HAVE_ARCH_TRACEHOOK
183	select HAVE_ARCH_TRANSPARENT_HUGEPAGE
184	select HAVE_ARCH_VMAP_STACK
185	select HAVE_ASM_MODVERSIONS
186	select HAVE_BUILDTIME_MCOUNT_SORT
187	select HAVE_CMPXCHG_DOUBLE
188	select HAVE_CMPXCHG_LOCAL
189	select HAVE_DEBUG_KMEMLEAK
190	select HAVE_DMA_CONTIGUOUS
191	select HAVE_DYNAMIC_FTRACE
192	select HAVE_DYNAMIC_FTRACE_WITH_ARGS
193	select HAVE_FTRACE_REGS_HAVING_PT_REGS
194	select HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
195	select HAVE_DYNAMIC_FTRACE_WITH_REGS
196	select HAVE_EBPF_JIT if HAVE_MARCH_Z196_FEATURES
197	select HAVE_EFFICIENT_UNALIGNED_ACCESS
198	select HAVE_GUP_FAST
199	select HAVE_FENTRY
200	select HAVE_FTRACE_GRAPH_FUNC
201	select HAVE_FUNCTION_ARG_ACCESS_API
202	select HAVE_FUNCTION_ERROR_INJECTION
203	select HAVE_FUNCTION_GRAPH_FREGS
204	select HAVE_FUNCTION_GRAPH_TRACER
205	select HAVE_FUNCTION_TRACER
206	select HAVE_GCC_PLUGINS
207	select HAVE_GENERIC_VDSO
208	select HAVE_IOREMAP_PROT if PCI
209	select HAVE_KERNEL_BZIP2
210	select HAVE_KERNEL_GZIP
211	select HAVE_KERNEL_LZ4
212	select HAVE_KERNEL_LZMA
213	select HAVE_KERNEL_LZO
214	select HAVE_KERNEL_UNCOMPRESSED
215	select HAVE_KERNEL_XZ
216	select HAVE_KERNEL_ZSTD
217	select HAVE_KPROBES
218	select HAVE_KPROBES_ON_FTRACE
219	select HAVE_KRETPROBES
220	select HAVE_LIVEPATCH
221	select HAVE_MEMBLOCK_PHYS_MAP
222	select HAVE_MOD_ARCH_SPECIFIC
223	select HAVE_NMI
224	select HAVE_NOP_MCOUNT
225	select HAVE_PAGE_SIZE_4KB
226	select HAVE_PCI
227	select HAVE_PERF_EVENTS
228	select HAVE_PERF_REGS
229	select HAVE_PERF_USER_STACK_DUMP
230	select HAVE_PREEMPT_DYNAMIC_KEY
231	select HAVE_REGS_AND_STACK_ACCESS_API
232	select HAVE_RELIABLE_STACKTRACE
233	select HAVE_RETHOOK
234	select HAVE_RSEQ
235	select HAVE_SAMPLE_FTRACE_DIRECT
236	select HAVE_SAMPLE_FTRACE_DIRECT_MULTI
237	select HAVE_SETUP_PER_CPU_AREA
238	select HAVE_SOFTIRQ_ON_OWN_STACK
239	select HAVE_SYSCALL_TRACEPOINTS
240	select HAVE_VIRT_CPU_ACCOUNTING
241	select HAVE_VIRT_CPU_ACCOUNTING_IDLE
242	select HOTPLUG_SMT
243	select IOMMU_HELPER		if PCI
244	select IOMMU_SUPPORT		if PCI
245	select KASAN_VMALLOC if KASAN
246	select LOCK_MM_AND_FIND_VMA
247	select MMU_GATHER_MERGE_VMAS
248	select MMU_GATHER_NO_GATHER
249	select MMU_GATHER_RCU_TABLE_FREE
250	select MODULES_USE_ELF_RELA
251	select NEED_DMA_MAP_STATE	if PCI
252	select NEED_PER_CPU_EMBED_FIRST_CHUNK
253	select NEED_PROC_VMCORE_DEVICE_RAM if PROC_VMCORE
254	select NEED_SG_DMA_LENGTH	if PCI
255	select OLD_SIGACTION
256	select OLD_SIGSUSPEND3
257	select PCI_DOMAINS		if PCI
258	select PCI_MSI			if PCI
259	select PCI_MSI_ARCH_FALLBACKS	if PCI_MSI
260	select PCI_QUIRKS		if PCI
261	select SPARSE_IRQ
262	select SWIOTLB
263	select SYSCTL_EXCEPTION_TRACE
264	select THREAD_INFO_IN_TASK
265	select TRACE_IRQFLAGS_SUPPORT
266	select TTY
267	select USER_STACKTRACE_SUPPORT
268	select VDSO_GETRANDOM
269	select VIRT_CPU_ACCOUNTING
270	select VMAP_STACK
271	select ZONE_DMA
272	# Note: keep the above list sorted alphabetically
273
274config SCHED_OMIT_FRAME_POINTER
275	def_bool y
276
277config PGTABLE_LEVELS
278	int
279	default 5
280
281source "kernel/livepatch/Kconfig"
282
283config ARCH_SUPPORTS_KEXEC
284	def_bool y
285
286config ARCH_SUPPORTS_KEXEC_FILE
287	def_bool y
288
289config ARCH_SUPPORTS_KEXEC_SIG
290	def_bool MODULE_SIG_FORMAT
291
292config ARCH_SUPPORTS_KEXEC_PURGATORY
293	def_bool y
294
295config ARCH_SUPPORTS_CRASH_DUMP
296	def_bool y
297	help
298	  Refer to <file:Documentation/arch/s390/zfcpdump.rst> for more details on this.
299	  This option also enables s390 zfcpdump.
300	  See also <file:Documentation/arch/s390/zfcpdump.rst>
301
302config ARCH_DEFAULT_CRASH_DUMP
303	def_bool y
304
305menu "Processor type and features"
306
307config HAVE_MARCH_Z10_FEATURES
308	def_bool n
309
310config HAVE_MARCH_Z196_FEATURES
311	def_bool n
312	select HAVE_MARCH_Z10_FEATURES
313
314config HAVE_MARCH_ZEC12_FEATURES
315	def_bool n
316	select HAVE_MARCH_Z196_FEATURES
317
318config HAVE_MARCH_Z13_FEATURES
319	def_bool n
320	select HAVE_MARCH_ZEC12_FEATURES
321
322config HAVE_MARCH_Z14_FEATURES
323	def_bool n
324	select HAVE_MARCH_Z13_FEATURES
325
326config HAVE_MARCH_Z15_FEATURES
327	def_bool n
328	select HAVE_MARCH_Z14_FEATURES
329
330config HAVE_MARCH_Z16_FEATURES
331	def_bool n
332	select HAVE_MARCH_Z15_FEATURES
333
334config HAVE_MARCH_Z17_FEATURES
335	def_bool n
336	select HAVE_MARCH_Z16_FEATURES
337
338choice
339	prompt "Processor type"
340	default MARCH_Z196
341
342config MARCH_Z10
343	bool "IBM System z10"
344	select HAVE_MARCH_Z10_FEATURES
345	depends on $(cc-option,-march=z10)
346	help
347	  Select this to enable optimizations for IBM System z10 (2097 and 2098
348	  series). This is the oldest machine generation currently supported.
349
350config MARCH_Z196
351	bool "IBM zEnterprise 114 and 196"
352	select HAVE_MARCH_Z196_FEATURES
353	depends on $(cc-option,-march=z196)
354	help
355	  Select this to enable optimizations for IBM zEnterprise 114 and 196
356	  (2818 and 2817 series). The kernel will be slightly faster but will
357	  not work on older machines.
358
359config MARCH_ZEC12
360	bool "IBM zBC12 and zEC12"
361	select HAVE_MARCH_ZEC12_FEATURES
362	depends on $(cc-option,-march=zEC12)
363	help
364	  Select this to enable optimizations for IBM zBC12 and zEC12 (2828 and
365	  2827 series). The kernel will be slightly faster but will not work on
366	  older machines.
367
368config MARCH_Z13
369	bool "IBM z13s and z13"
370	select HAVE_MARCH_Z13_FEATURES
371	depends on $(cc-option,-march=z13)
372	help
373	  Select this to enable optimizations for IBM z13s and z13 (2965 and
374	  2964 series). The kernel will be slightly faster but will not work on
375	  older machines.
376
377config MARCH_Z14
378	bool "IBM z14 ZR1 and z14"
379	select HAVE_MARCH_Z14_FEATURES
380	depends on $(cc-option,-march=z14)
381	help
382	  Select this to enable optimizations for IBM z14 ZR1 and z14 (3907
383	  and 3906 series). The kernel will be slightly faster but will not
384	  work on older machines.
385
386config MARCH_Z15
387	bool "IBM z15"
388	select HAVE_MARCH_Z15_FEATURES
389	depends on $(cc-option,-march=z15)
390	help
391	  Select this to enable optimizations for IBM z15 (8562
392	  and 8561 series). The kernel will be slightly faster but will not
393	  work on older machines.
394
395config MARCH_Z16
396	bool "IBM z16"
397	select HAVE_MARCH_Z16_FEATURES
398	depends on $(cc-option,-march=z16)
399	help
400	  Select this to enable optimizations for IBM z16 (3931 and
401	  3932 series).
402
403config MARCH_Z17
404	bool "IBM z17"
405	select HAVE_MARCH_Z17_FEATURES
406	depends on $(cc-option,-march=z17)
407	help
408	  Select this to enable optimizations for IBM z17 (9175 and
409	  9176 series).
410
411endchoice
412
413config MARCH_Z10_TUNE
414	def_bool TUNE_Z10 || MARCH_Z10 && TUNE_DEFAULT
415
416config MARCH_Z196_TUNE
417	def_bool TUNE_Z196 || MARCH_Z196 && TUNE_DEFAULT
418
419config MARCH_ZEC12_TUNE
420	def_bool TUNE_ZEC12 || MARCH_ZEC12 && TUNE_DEFAULT
421
422config MARCH_Z13_TUNE
423	def_bool TUNE_Z13 || MARCH_Z13 && TUNE_DEFAULT
424
425config MARCH_Z14_TUNE
426	def_bool TUNE_Z14 || MARCH_Z14 && TUNE_DEFAULT
427
428config MARCH_Z15_TUNE
429	def_bool TUNE_Z15 || MARCH_Z15 && TUNE_DEFAULT
430
431config MARCH_Z16_TUNE
432	def_bool TUNE_Z16 || MARCH_Z16 && TUNE_DEFAULT
433
434config MARCH_Z17_TUNE
435	def_bool TUNE_Z17 || MARCH_Z17 && TUNE_DEFAULT
436
437choice
438	prompt "Tune code generation"
439	default TUNE_DEFAULT
440	help
441	  Cause the compiler to tune (-mtune) the generated code for a machine.
442	  This will make the code run faster on the selected machine but
443	  somewhat slower on other machines.
444	  This option only changes how the compiler emits instructions, not the
445	  selection of instructions itself, so the resulting kernel will run on
446	  all other machines.
447
448config TUNE_DEFAULT
449	bool "Default"
450	help
451	  Tune the generated code for the target processor for which the kernel
452	  will be compiled.
453
454config TUNE_Z10
455	bool "IBM System z10"
456
457config TUNE_Z196
458	bool "IBM zEnterprise 114 and 196"
459	depends on $(cc-option,-mtune=z196)
460
461config TUNE_ZEC12
462	bool "IBM zBC12 and zEC12"
463	depends on $(cc-option,-mtune=zEC12)
464
465config TUNE_Z13
466	bool "IBM z13s and z13"
467	depends on $(cc-option,-mtune=z13)
468
469config TUNE_Z14
470	bool "IBM z14 ZR1 and z14"
471	depends on $(cc-option,-mtune=z14)
472
473config TUNE_Z15
474	bool "IBM z15"
475	depends on $(cc-option,-mtune=z15)
476
477config TUNE_Z16
478	bool "IBM z16"
479	depends on $(cc-option,-mtune=z16)
480
481config TUNE_Z17
482	bool "IBM z17"
483	depends on $(cc-option,-mtune=z17)
484
485endchoice
486
487config 64BIT
488	def_bool y
489
490config COMMAND_LINE_SIZE
491	int "Maximum size of kernel command line"
492	default 4096
493	range 896 1048576
494	help
495	  This allows you to specify the maximum length of the kernel command
496	  line.
497
498config COMPAT
499	def_bool n
500	prompt "Kernel support for 31 bit emulation"
501	select ARCH_WANT_OLD_COMPAT_IPC
502	select COMPAT_OLD_SIGACTION
503	select HAVE_UID16
504	depends on MULTIUSER
505	depends on !CC_IS_CLANG && !LD_IS_LLD
506	help
507	  Select this option if you want to enable your system kernel to
508	  handle system-calls from ELF binaries for 31 bit ESA.  This option
509	  (and some other stuff like libraries and such) is needed for
510	  executing 31 bit applications.
511
512	  If unsure say N.
513
514config SMP
515	def_bool y
516
517config NR_CPUS
518	int "Maximum number of CPUs (2-512)"
519	range 2 512
520	default "64"
521	help
522	  This allows you to specify the maximum number of CPUs which this
523	  kernel will support. The maximum supported value is 512 and the
524	  minimum value which makes sense is 2.
525
526	  This is purely to save memory - each supported CPU adds
527	  approximately sixteen kilobytes to the kernel image.
528
529config HOTPLUG_CPU
530	def_bool y
531
532config NUMA
533	bool "NUMA support"
534	depends on SCHED_TOPOLOGY
535	default n
536	help
537	  Enable NUMA support
538
539	  This option adds NUMA support to the kernel.
540
541config NODES_SHIFT
542	int
543	depends on NUMA
544	default "1"
545
546config SCHED_SMT
547	def_bool n
548
549config SCHED_MC
550	def_bool n
551
552config SCHED_TOPOLOGY
553	def_bool y
554	prompt "Topology scheduler support"
555	select SCHED_SMT
556	select SCHED_MC
557	help
558	  Topology scheduler support improves the CPU scheduler's decision
559	  making when dealing with machines that have multi-threading,
560	  multiple cores or multiple books.
561
562config SCHED_TOPOLOGY_VERTICAL
563	def_bool y
564	bool "Use vertical CPU polarization by default"
565	depends on SCHED_TOPOLOGY
566	help
567	  Use vertical CPU polarization by default if available.
568	  The default CPU polarization is horizontal.
569
570config HIPERDISPATCH_ON
571	def_bool y
572	bool "Use hiperdispatch on vertical polarization by default"
573	depends on SCHED_TOPOLOGY
574	depends on PROC_SYSCTL
575	help
576	  Hiperdispatch aims to improve the CPU scheduler's decision
577	  making when using vertical polarization by adjusting CPU
578	  capacities dynamically. Set this option to use hiperdispatch
579	  on vertical polarization by default. This can be overwritten
580	  by sysctl's s390.hiperdispatch attribute later on.
581
582source "kernel/Kconfig.hz"
583
584config CERT_STORE
585	bool "Get user certificates via DIAG320"
586	depends on KEYS
587	select CRYPTO_LIB_SHA256
588	help
589	  Enable this option if you want to access user-provided secure boot
590	  certificates via DIAG 0x320.
591
592	  These certificates will be made available via the keyring named
593	  'cert_store'.
594
595config KERNEL_NOBP
596	def_bool n
597	prompt "Enable modified branch prediction for the kernel by default"
598	help
599	  If this option is selected the kernel will switch to a modified
600	  branch prediction mode if the firmware interface is available.
601	  The modified branch prediction mode improves the behaviour in
602	  regard to speculative execution.
603
604	  With the option enabled the kernel parameter "nobp=0" or "nospec"
605	  can be used to run the kernel in the normal branch prediction mode.
606
607	  With the option disabled the modified branch prediction mode is
608	  enabled with the "nobp=1" kernel parameter.
609
610	  If unsure, say N.
611
612config EXPOLINE
613	def_bool n
614	depends on $(cc-option,-mindirect-branch=thunk)
615	prompt "Avoid speculative indirect branches in the kernel"
616	help
617	  Compile the kernel with the expoline compiler options to guard
618	  against kernel-to-user data leaks by avoiding speculative indirect
619	  branches.
620	  Requires a compiler with -mindirect-branch=thunk support for full
621	  protection. The kernel may run slower.
622
623	  If unsure, say N.
624
625config EXPOLINE_EXTERN
626	def_bool EXPOLINE && CC_IS_GCC && GCC_VERSION >= 110200 && \
627		 $(success,$(srctree)/arch/s390/tools/gcc-thunk-extern.sh $(CC))
628	help
629	  Generate expolines as external functions if the compiler supports it.
630	  This option is required for some tooling like kpatch, if expolines
631	  are enabled. The kernel is compiled with
632	  -mindirect-branch=thunk-extern, which requires a newer compiler.
633
634choice
635	prompt "Expoline default"
636	depends on EXPOLINE
637	default EXPOLINE_FULL
638
639config EXPOLINE_OFF
640	bool "spectre_v2=off"
641
642config EXPOLINE_AUTO
643	bool "spectre_v2=auto"
644
645config EXPOLINE_FULL
646	bool "spectre_v2=on"
647
648endchoice
649
650config RELOCATABLE
651	def_bool y
652	select ARCH_VMLINUX_NEEDS_RELOCS
653	help
654	  This builds a kernel image that retains relocation information
655	  so it can be loaded at an arbitrary address.
656	  The relocations make the kernel image about 15% larger (compressed
657	  10%), but are discarded at runtime.
658	  Note: this option exists only for documentation purposes, please do
659	  not remove it.
660
661config RANDOMIZE_BASE
662	bool "Randomize the address of the kernel image (KASLR)"
663	default y
664	help
665	  In support of Kernel Address Space Layout Randomization (KASLR),
666	  this randomizes the address at which the kernel image is loaded,
667	  as a security feature that deters exploit attempts relying on
668	  knowledge of the location of kernel internals.
669
670config RANDOMIZE_IDENTITY_BASE
671	bool "Randomize the address of the identity mapping base"
672	depends on RANDOMIZE_BASE
673	default DEBUG_VM
674	help
675	  The identity mapping base address is pinned to zero by default.
676	  Allow randomization of that base to expose otherwise missed
677	  notion of physical and virtual addresses of data structures.
678	  That does not have any impact on the base address at which the
679	  kernel image is loaded.
680
681	  If unsure, say N
682
683config KERNEL_IMAGE_BASE
684	hex "Kernel image base address"
685	range 0x100000 0x1FFFFFE0000000 if !KASAN
686	range 0x100000 0x1BFFFFE0000000 if KASAN
687	default 0x3FFE0000000 if !KASAN
688	default 0x7FFFE0000000 if KASAN
689	help
690	  This is the address at which the kernel image is loaded in case
691	  Kernel Address Space Layout Randomization (KASLR) is disabled.
692
693	  In case the Protected virtualization guest support is enabled the
694	  Ultravisor imposes a virtual address limit. If the value of this
695	  option leads to the kernel image exceeding the Ultravisor limit,
696	  this option is ignored and the image is loaded below the limit.
697
698	  If the value of this option leads to the kernel image overlapping
699	  the virtual memory where other data structures are located, this
700	  option is ignored and the image is loaded above the structures.
701
702endmenu
703
704menu "Memory setup"
705
706config ARCH_SPARSEMEM_ENABLE
707	def_bool y
708	select SPARSEMEM_VMEMMAP_ENABLE
709	select SPARSEMEM_VMEMMAP
710
711config ARCH_SPARSEMEM_DEFAULT
712	def_bool y
713
714config MAX_PHYSMEM_BITS
715	int "Maximum size of supported physical memory in bits (42-53)"
716	range 42 53
717	default "46"
718	help
719	  This option specifies the maximum supported size of physical memory
720	  in bits. Supported is any size between 2^42 (4TB) and 2^53 (8PB).
721	  Increasing the number of bits also increases the kernel image size.
722	  By default 46 bits (64TB) are supported.
723
724endmenu
725
726menu "I/O subsystem"
727
728config QDIO
729	def_tristate y
730	prompt "QDIO support"
731	help
732	  This driver provides the Queued Direct I/O base support for
733	  IBM System z.
734
735	  To compile this driver as a module, choose M here: the
736	  module will be called qdio.
737
738	  If unsure, say Y.
739
740if PCI
741
742config PCI_NR_FUNCTIONS
743	int "Maximum number of PCI functions (1-4096)"
744	range 1 4096
745	default "512"
746	help
747	  This allows you to specify the maximum number of PCI functions which
748	  this kernel will support.
749
750endif # PCI
751
752config HAS_IOMEM
753	def_bool PCI
754
755config CHSC_SCH
756	def_tristate m
757	prompt "Support for CHSC subchannels"
758	help
759	  This driver allows usage of CHSC subchannels. A CHSC subchannel
760	  is usually present on LPAR only.
761	  The driver creates a device /dev/chsc, which may be used to
762	  obtain I/O configuration information about the machine and
763	  to issue asynchronous chsc commands (DANGEROUS).
764	  You will usually only want to use this interface on a special
765	  LPAR designated for system management.
766
767	  To compile this driver as a module, choose M here: the
768	  module will be called chsc_sch.
769
770	  If unsure, say N.
771
772config SCM_BUS
773	def_bool y
774	prompt "SCM bus driver"
775	help
776	  Bus driver for Storage Class Memory.
777
778config EADM_SCH
779	def_tristate m
780	prompt "Support for EADM subchannels"
781	depends on SCM_BUS
782	help
783	  This driver allows usage of EADM subchannels. EADM subchannels act
784	  as a communication vehicle for SCM increments.
785
786	  To compile this driver as a module, choose M here: the
787	  module will be called eadm_sch.
788
789config AP
790	def_tristate y
791	prompt "Support for Adjunct Processors (ap)"
792	help
793	  This driver allows usage to Adjunct Processor (AP) devices via
794	  the ap bus, cards and queues. Supported Adjunct Processors are
795	  the CryptoExpress Cards (CEX).
796
797	  To compile this driver as a module, choose M here: the
798	  module will be called ap.
799
800	  If unsure, say Y (default).
801
802config AP_DEBUG
803	def_bool n
804	prompt "Enable debug features for Adjunct Processor (ap) devices"
805	depends on AP
806	help
807	  Say 'Y' here to enable some additional debug features for Adjunct
808	  Processor (ap) devices.
809
810	  There will be some more sysfs attributes displayed for ap queues.
811
812	  Do not enable on production level kernel build.
813
814	  If unsure, say N.
815
816config VFIO_CCW
817	def_tristate n
818	prompt "Support for VFIO-CCW subchannels"
819	depends on VFIO
820	select VFIO_MDEV
821	help
822	  This driver allows usage of I/O subchannels via VFIO-CCW.
823
824	  To compile this driver as a module, choose M here: the
825	  module will be called vfio_ccw.
826
827config VFIO_AP
828	def_tristate n
829	prompt "VFIO support for AP devices"
830	depends on KVM
831	depends on VFIO
832	depends on AP
833	select VFIO_MDEV
834	help
835	  This driver grants access to Adjunct Processor (AP) devices
836	  via the VFIO mediated device interface.
837
838	  To compile this driver as a module, choose M here: the module
839	  will be called vfio_ap.
840
841endmenu
842
843config CCW
844	def_bool y
845
846config HAVE_PNETID
847	tristate
848	default (SMC || CCWGROUP)
849
850menu "Virtualization"
851
852config PFAULT
853	def_bool y
854	prompt "Pseudo page fault support"
855	help
856	  Select this option, if you want to use PFAULT pseudo page fault
857	  handling under VM. If running native or in LPAR, this option
858	  has no effect. If your VM does not support PFAULT, PAGEEX
859	  pseudo page fault handling will be used.
860	  Note that VM 4.2 supports PFAULT but has a bug in its
861	  implementation that causes some problems.
862	  Everybody who wants to run Linux under VM != VM4.2 should select
863	  this option.
864
865config CMM
866	def_tristate n
867	prompt "Cooperative memory management"
868	help
869	  Select this option, if you want to enable the kernel interface
870	  to reduce the memory size of the system. This is accomplished
871	  by allocating pages of memory and put them "on hold". This only
872	  makes sense for a system running under VM where the unused pages
873	  will be reused by VM for other guest systems. The interface
874	  allows an external monitor to balance memory of many systems.
875	  Everybody who wants to run Linux under VM should select this
876	  option.
877
878config CMM_IUCV
879	def_bool y
880	prompt "IUCV special message interface to cooperative memory management"
881	depends on CMM && (SMSGIUCV=y || CMM=SMSGIUCV)
882	help
883	  Select this option to enable the special message interface to
884	  the cooperative memory management.
885
886config APPLDATA_BASE
887	def_bool n
888	prompt "Linux - VM Monitor Stream, base infrastructure"
889	depends on PROC_SYSCTL
890	help
891	  This provides a kernel interface for creating and updating z/VM APPLDATA
892	  monitor records. The monitor records are updated at certain time
893	  intervals, once the timer is started.
894	  Writing 1 or 0 to /proc/appldata/timer starts(1) or stops(0) the timer,
895	  i.e. enables or disables monitoring on the Linux side.
896	  A custom interval value (in seconds) can be written to
897	  /proc/appldata/interval.
898
899	  Defaults are 60 seconds interval and timer off.
900	  The /proc entries can also be read from, showing the current settings.
901
902config APPLDATA_MEM
903	def_tristate m
904	prompt "Monitor memory management statistics"
905	depends on APPLDATA_BASE && VM_EVENT_COUNTERS
906	help
907	  This provides memory management related data to the Linux - VM Monitor
908	  Stream, like paging/swapping rate, memory utilisation, etc.
909	  Writing 1 or 0 to /proc/appldata/memory creates(1) or removes(0) a z/VM
910	  APPLDATA monitor record, i.e. enables or disables monitoring this record
911	  on the z/VM side.
912
913	  Default is disabled.
914	  The /proc entry can also be read from, showing the current settings.
915
916	  This can also be compiled as a module, which will be called
917	  appldata_mem.o.
918
919config APPLDATA_OS
920	def_tristate m
921	prompt "Monitor OS statistics"
922	depends on APPLDATA_BASE
923	help
924	  This provides OS related data to the Linux - VM Monitor Stream, like
925	  CPU utilisation, etc.
926	  Writing 1 or 0 to /proc/appldata/os creates(1) or removes(0) a z/VM
927	  APPLDATA monitor record, i.e. enables or disables monitoring this record
928	  on the z/VM side.
929
930	  Default is disabled.
931	  This can also be compiled as a module, which will be called
932	  appldata_os.o.
933
934config APPLDATA_NET_SUM
935	def_tristate m
936	prompt "Monitor overall network statistics"
937	depends on APPLDATA_BASE && NET
938	help
939	  This provides network related data to the Linux - VM Monitor Stream,
940	  currently there is only a total sum of network I/O statistics, no
941	  per-interface data.
942	  Writing 1 or 0 to /proc/appldata/net_sum creates(1) or removes(0) a z/VM
943	  APPLDATA monitor record, i.e. enables or disables monitoring this record
944	  on the z/VM side.
945
946	  Default is disabled.
947	  This can also be compiled as a module, which will be called
948	  appldata_net_sum.o.
949
950config S390_HYPFS
951	def_bool y
952	prompt "s390 hypervisor information"
953	help
954	  This provides several binary files at (debugfs)/s390_hypfs/ to
955	  provide accounting information in an s390 hypervisor environment.
956
957config S390_HYPFS_FS
958	def_bool n
959	prompt "s390 hypervisor file system support"
960	select SYS_HYPERVISOR
961	depends on S390_HYPFS
962	help
963	  This is a virtual file system intended to provide accounting
964	  information in an s390 hypervisor environment. This file system
965	  is deprecated and should not be used.
966
967	  Say N if you are unsure.
968
969source "arch/s390/kvm/Kconfig"
970
971config S390_GUEST
972	def_bool y
973	prompt "s390 support for virtio devices"
974	select TTY
975	select VIRTUALIZATION
976	select VIRTIO
977	help
978	  Enabling this option adds support for virtio based paravirtual device
979	  drivers on s390.
980
981	  Select this option if you want to run the kernel as a guest under
982	  the KVM hypervisor.
983
984endmenu
985
986config S390_MODULES_SANITY_TEST_HELPERS
987	def_bool n
988
989menu "Selftests"
990
991config S390_UNWIND_SELFTEST
992	def_tristate n
993	depends on KUNIT
994	default KUNIT_ALL_TESTS
995	prompt "Test unwind functions"
996	help
997	  This option enables s390 specific stack unwinder testing kernel
998	  module. This option is not useful for distributions or general
999	  kernels, but only for kernel developers working on architecture code.
1000
1001	  Say N if you are unsure.
1002
1003config S390_KPROBES_SANITY_TEST
1004	def_tristate n
1005	prompt "Enable s390 specific kprobes tests"
1006	depends on KPROBES
1007	depends on KUNIT
1008	help
1009	  This option enables an s390 specific kprobes test module. This option
1010	  is not useful for distributions or general kernels, but only for kernel
1011	  developers working on architecture code.
1012
1013	  Say N if you are unsure.
1014
1015config S390_MODULES_SANITY_TEST
1016	def_tristate n
1017	depends on KUNIT
1018	default KUNIT_ALL_TESTS
1019	prompt "Enable s390 specific modules tests"
1020	select S390_MODULES_SANITY_TEST_HELPERS
1021	help
1022	  This option enables an s390 specific modules test. This option is
1023	  not useful for distributions or general kernels, but only for
1024	  kernel developers working on architecture code.
1025
1026	  Say N if you are unsure.
1027endmenu
1028