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