1 # SPDX-License-Identifier: GPL-2.0
6 source "virt/kvm/Kconfig"
8 menuconfig VIRTUALIZATION
12 Say Y here to get to see options for using your Linux host to run other
13 operating systems inside virtual machines (guests).
14 This option alone does not add any kernel code.
16 If you say N, all options in this submenu will be skipped and disabled.
21 tristate "Kernel-based Virtual Machine (KVM) support"
22 depends on X86_LOCAL_APIC
24 select KVM_GENERIC_MMU_NOTIFIER
25 select HAVE_KVM_IRQCHIP
26 select HAVE_KVM_PFNCACHE
27 select HAVE_KVM_DIRTY_RING_TSO
28 select HAVE_KVM_DIRTY_RING_ACQ_REL
29 select HAVE_KVM_IRQ_BYPASS
30 select HAVE_KVM_IRQ_ROUTING
31 select HAVE_KVM_READONLY_MEM
33 select USER_RETURN_NOTIFIER
37 select GUEST_PERF_EVENTS
39 select HAVE_KVM_CPU_RELAX_INTERCEPT
40 select HAVE_KVM_NO_POLL
41 select KVM_XFER_TO_GUEST_WORK
42 select KVM_GENERIC_DIRTYLOG_READ_PROTECT
44 select HAVE_KVM_PM_NOTIFIER if PM
45 select KVM_GENERIC_HARDWARE_ENABLING
46 select KVM_GENERIC_PRE_FAULT_MEMORY
47 select KVM_WERROR if WERROR
49 Support hosting fully virtualized guest machines using hardware
50 virtualization extensions. You will need a fairly recent
51 processor equipped with virtualization extensions. You will also
52 need to select one or more of the processor modules below.
54 This module provides access to the hardware capabilities through
55 a character device node named /dev/kvm.
57 To compile this as a module, choose M here: the module
63 bool "Compile KVM with -Werror"
64 # Disallow KVM's -Werror if KASAN is enabled, e.g. to guard against
65 # randomized configs from selecting KVM_WERROR=y, which doesn't play
66 # nice with KASAN. KASAN builds generates warnings for the default
67 # FRAME_WARN, i.e. KVM_WERROR=y with KASAN=y requires special tuning.
68 # Building KVM with -Werror and KASAN is still doable via enabling
69 # the kernel-wide WERROR=y.
70 depends on KVM && ((EXPERT && !KASAN) || WERROR)
72 Add -Werror to the build flags for KVM.
76 config KVM_SW_PROTECTED_VM
77 bool "Enable support for KVM software-protected VMs"
79 depends on KVM && X86_64
80 select KVM_GENERIC_PRIVATE_MEM
82 Enable support for KVM software-protected VMs. Currently, software-
83 protected VMs are purely a development and testing vehicle for
84 KVM_CREATE_GUEST_MEMFD. Attempting to run a "real" VM workload as a
85 software-protected VM will fail miserably.
90 tristate "KVM for Intel (and compatible) processors support"
91 depends on KVM && IA32_FEAT_CTL
93 Provides support for KVM on processors equipped with Intel's VT
94 extensions, a.k.a. Virtual Machine Extensions (VMX).
96 To compile this as a module, choose M here: the module
97 will be called kvm-intel.
99 config KVM_INTEL_PROVE_VE
100 bool "Check that guests do not receive #VE exceptions"
101 depends on KVM_INTEL && EXPERT
103 Checks that KVM's page table management code will not incorrectly
104 let guests receive a virtualization exception. Virtualization
105 exceptions will be trapped by the hypervisor rather than injected
108 Note: some CPUs appear to generate spurious EPT Violations #VEs
109 that trigger KVM's WARN, in particular with eptad=0 and/or nested
115 bool "Software Guard eXtensions (SGX) Virtualization"
116 depends on X86_SGX && KVM_INTEL
119 Enables KVM guests to create SGX enclaves.
121 This includes support to expose "raw" unreclaimable enclave memory to
122 guests via a device node, e.g. /dev/sgx_vepc.
127 tristate "KVM for AMD processors support"
128 depends on KVM && (CPU_SUP_AMD || CPU_SUP_HYGON)
130 Provides support for KVM on AMD processors equipped with the AMD-V
133 To compile this as a module, choose M here: the module
134 will be called kvm-amd.
137 bool "AMD Secure Encrypted Virtualization (SEV) support"
139 depends on KVM_AMD && X86_64
140 depends on CRYPTO_DEV_SP_PSP && !(KVM_AMD=y && CRYPTO_DEV_CCP_DD=m)
141 select ARCH_HAS_CC_PLATFORM
142 select KVM_GENERIC_PRIVATE_MEM
143 select HAVE_KVM_ARCH_GMEM_PREPARE
144 select HAVE_KVM_ARCH_GMEM_INVALIDATE
146 Provides support for launching encrypted VMs which use Secure
147 Encrypted Virtualization (SEV), Secure Encrypted Virtualization with
148 Encrypted State (SEV-ES), and Secure Encrypted Virtualization with
149 Secure Nested Paging (SEV-SNP) technologies on AMD processors.
152 bool "System Management Mode emulation"
156 Provides support for KVM to emulate System Management Mode (SMM)
157 in virtual machines. This can be used by the virtual machine
158 firmware to implement UEFI secure boot.
163 bool "Support for Microsoft Hyper-V emulation"
167 Provides KVM support for emulating Microsoft Hyper-V. This allows KVM
168 to expose a subset of the paravirtualized interfaces defined in the
169 Hyper-V Hypervisor Top-Level Functional Specification (TLFS):
170 https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/reference/tlfs
171 These interfaces are required for the correct and performant functioning
172 of Windows and Hyper-V guests on KVM.
177 bool "Support for Xen hypercall interface"
180 Provides KVM support for the hosting Xen HVM guests and
181 passing Xen hypercalls to userspace.
183 If in doubt, say "N".
186 bool "Prove KVM MMU correctness"
187 depends on DEBUG_KERNEL
191 Enables runtime assertions in KVM's MMU that are too costly to enable
192 in anything remotely resembling a production environment, e.g. this
193 gates code that verifies a to-be-freed page table doesn't have any
196 If in doubt, say "N".
198 config KVM_EXTERNAL_WRITE_TRACKING
201 config KVM_MAX_NR_VCPUS
202 int "Maximum number of vCPUs per KVM guest"
205 default 4096 if MAXSMP
208 Set the maximum number of vCPUs per KVM guest. Larger values will increase
209 the memory footprint of each KVM guest, regardless of how many vCPUs are
210 created for a given VM.
212 endif # VIRTUALIZATION