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