Merge tag 'pinctrl-v6.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
[linux-block.git] / arch / x86 / kvm / Kconfig
CommitLineData
b2441318 1# SPDX-License-Identifier: GPL-2.0
6aa8b732
AK
2#
3# KVM configuration
4#
fb56dbb3 5
0ba12d10 6source "virt/kvm/Kconfig"
5d9b8e30 7
de062065
JE
8menuconfig VIRTUALIZATION
9 bool "Virtualization"
de062065 10 default y
a7f7f624 11 help
36a74097
AK
12 Say Y here to get to see options for using your Linux host to run other
13 operating systems inside virtual machines (guests).
06bfb7eb
JE
14 This option alone does not add any kernel code.
15
16 If you say N, all options in this submenu will be skipped and disabled.
de062065
JE
17
18if VIRTUALIZATION
fd24dc4a 19
6aa8b732
AK
20config KVM
21 tristate "Kernel-based Virtual Machine (KVM) support"
92b5265d 22 depends on HIGH_RES_TIMERS
e42eef4b 23 depends on X86_LOCAL_APIC
caadf876 24 select KVM_COMMON
f128cf8c 25 select KVM_GENERIC_MMU_NOTIFIER
0ba12d10 26 select HAVE_KVM_IRQCHIP
982ed0de 27 select HAVE_KVM_PFNCACHE
17601bfe 28 select HAVE_KVM_DIRTY_RING_TSO
fc0693d4 29 select HAVE_KVM_DIRTY_RING_ACQ_REL
87276880 30 select HAVE_KVM_IRQ_BYPASS
a725d56a 31 select HAVE_KVM_IRQ_ROUTING
8886640d 32 select HAVE_KVM_READONLY_MEM
af585b92 33 select KVM_ASYNC_PF
18863bdd 34 select USER_RETURN_NOTIFIER
50eb2a3c 35 select KVM_MMIO
63b3f96e 36 select SCHED_INFO
f5132b01 37 select PERF_EVENTS
2aef6f30 38 select GUEST_PERF_EVENTS
07975ad3 39 select HAVE_KVM_MSI
f2a74347 40 select HAVE_KVM_CPU_RELAX_INTERCEPT
2d5ba19b 41 select HAVE_KVM_NO_POLL
72c3c0fe 42 select KVM_XFER_TO_GUEST_WORK
e108ff2f 43 select KVM_GENERIC_DIRTYLOG_READ_PROTECT
ec53500f 44 select KVM_VFIO
7d62874f 45 select HAVE_KVM_PM_NOTIFIER if PM
441f7bfa 46 select KVM_GENERIC_HARDWARE_ENABLING
a7f7f624 47 help
6aa8b732
AK
48 Support hosting fully virtualized guest machines using hardware
49 virtualization extensions. You will need a fairly recent
50 processor equipped with virtualization extensions. You will also
51 need to select one or more of the processor modules below.
52
53 This module provides access to the hardware capabilities through
54 a character device node named /dev/kvm.
55
56 To compile this as a module, choose M here: the module
57 will be called kvm.
58
59 If unsure, say N.
60
4f337faf
PB
61config KVM_WERROR
62 bool "Compile KVM with -Werror"
75bedc1e
SC
63 # Disallow KVM's -Werror if KASAN is enabled, e.g. to guard against
64 # randomized configs from selecting KVM_WERROR=y, which doesn't play
65 # nice with KASAN. KASAN builds generates warnings for the default
66 # FRAME_WARN, i.e. KVM_WERROR=y with KASAN=y requires special tuning.
67 # Building KVM with -Werror and KASAN is still doable via enabling
68 # the kernel-wide WERROR=y.
69 depends on KVM && EXPERT && !KASAN
4f337faf 70 help
a754acc3 71 Add -Werror to the build flags for KVM.
4f337faf
PB
72
73 If in doubt, say "N".
74
89ea60c2
SC
75config KVM_SW_PROTECTED_VM
76 bool "Enable support for KVM software-protected VMs"
77 depends on EXPERT
78328801 78 depends on KVM && X86_64
89ea60c2
SC
79 select KVM_GENERIC_PRIVATE_MEM
80 help
42269209
SC
81 Enable support for KVM software-protected VMs. Currently, software-
82 protected VMs are purely a development and testing vehicle for
83 KVM_CREATE_GUEST_MEMFD. Attempting to run a "real" VM workload as a
84 software-protected VM will fail miserably.
89ea60c2
SC
85
86 If unsure, say "N".
87
6aa8b732 88config KVM_INTEL
8f63aaf5
SC
89 tristate "KVM for Intel (and compatible) processors support"
90 depends on KVM && IA32_FEAT_CTL
a7f7f624 91 help
8f63aaf5
SC
92 Provides support for KVM on processors equipped with Intel's VT
93 extensions, a.k.a. Virtual Machine Extensions (VMX).
6aa8b732 94
58f8ac27
RD
95 To compile this as a module, choose M here: the module
96 will be called kvm-intel.
97
540745dd
SC
98config X86_SGX_KVM
99 bool "Software Guard eXtensions (SGX) Virtualization"
100 depends on X86_SGX && KVM_INTEL
101 help
102
103 Enables KVM guests to create SGX enclaves.
104
105 This includes support to expose "raw" unreclaimable enclave memory to
106 guests via a device node, e.g. /dev/sgx_vepc.
107
108 If unsure, say N.
109
6aa8b732
AK
110config KVM_AMD
111 tristate "KVM for AMD processors support"
554856b6 112 depends on KVM && (CPU_SUP_AMD || CPU_SUP_HYGON)
a7f7f624 113 help
6aa8b732
AK
114 Provides support for KVM on AMD processors equipped with the AMD-V
115 (SVM) extensions.
fd24dc4a 116
58f8ac27
RD
117 To compile this as a module, choose M here: the module
118 will be called kvm-amd.
119
5dd0a57c 120config KVM_AMD_SEV
5dd0a57c 121 bool "AMD Secure Encrypted Virtualization (SEV) support"
cd14b018 122 default y
5dd0a57c 123 depends on KVM_AMD && X86_64
d30f370d 124 depends on CRYPTO_DEV_SP_PSP && !(KVM_AMD=y && CRYPTO_DEV_CCP_DD=m)
54f5f47b 125 select ARCH_HAS_CC_PLATFORM
a7f7f624 126 help
916391a2
TL
127 Provides support for launching Encrypted VMs (SEV) and Encrypted VMs
128 with Encrypted State (SEV-ES) on AMD processors.
5dd0a57c 129
4b8e1b32
PB
130config KVM_SMM
131 bool "System Management Mode emulation"
132 default y
133 depends on KVM
134 help
135 Provides support for KVM to emulate System Management Mode (SMM)
136 in virtual machines. This can be used by the virtual machine
137 firmware to implement UEFI secure boot.
138
139 If unsure, say Y.
140
b4f69df0
VK
141config KVM_HYPERV
142 bool "Support for Microsoft Hyper-V emulation"
143 depends on KVM
144 default y
145 help
146 Provides KVM support for emulating Microsoft Hyper-V. This allows KVM
147 to expose a subset of the paravirtualized interfaces defined in the
148 Hyper-V Hypervisor Top-Level Functional Specification (TLFS):
149 https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/reference/tlfs
150 These interfaces are required for the correct and performant functioning
151 of Windows and Hyper-V guests on KVM.
152
153 If unsure, say "Y".
154
b59b153d
PB
155config KVM_XEN
156 bool "Support for Xen hypercall interface"
157 depends on KVM
158 help
159 Provides KVM support for the hosting Xen HVM guests and
160 passing Xen hypercalls to userspace.
161
162 If in doubt, say "N".
163
870d4d4e
SC
164config KVM_PROVE_MMU
165 bool "Prove KVM MMU correctness"
166 depends on DEBUG_KERNEL
167 depends on KVM
168 depends on EXPERT
169 help
170 Enables runtime assertions in KVM's MMU that are too costly to enable
171 in anything remotely resembling a production environment, e.g. this
172 gates code that verifies a to-be-freed page table doesn't have any
173 present SPTEs.
174
175 If in doubt, say "N".
176
e9d0c0c4
DS
177config KVM_EXTERNAL_WRITE_TRACKING
178 bool
179
f10a570b
KM
180config KVM_MAX_NR_VCPUS
181 int "Maximum number of vCPUs per KVM guest"
182 depends on KVM
183 range 1024 4096
184 default 4096 if MAXSMP
185 default 1024
186 help
187 Set the maximum number of vCPUs per KVM guest. Larger values will increase
188 the memory footprint of each KVM guest, regardless of how many vCPUs are
189 created for a given VM.
190
de062065 191endif # VIRTUALIZATION