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