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