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