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 def_tristate KVM if (KVM_INTEL != n || KVM_AMD != n)
23 select KVM_GENERIC_MMU_NOTIFIER
24 select KVM_ELIDE_TLB_FLUSH_IF_YOUNG
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
34 select USER_RETURN_NOTIFIER
38 select GUEST_PERF_EVENTS
40 select HAVE_KVM_CPU_RELAX_INTERCEPT
41 select HAVE_KVM_NO_POLL
42 select KVM_XFER_TO_GUEST_WORK
43 select KVM_GENERIC_DIRTYLOG_READ_PROTECT
45 select HAVE_KVM_PM_NOTIFIER if PM
46 select KVM_GENERIC_HARDWARE_ENABLING
47 select KVM_GENERIC_PRE_FAULT_MEMORY
48 select KVM_GENERIC_PRIVATE_MEM if KVM_SW_PROTECTED_VM
49 select KVM_WERROR if WERROR
52 tristate "Kernel-based Virtual Machine (KVM) support"
53 depends on X86_LOCAL_APIC
55 Support hosting fully virtualized guest machines using hardware
56 virtualization extensions. You will need a fairly recent
57 processor equipped with virtualization extensions. You will also
58 need to select one or more of the processor modules below.
60 This module provides access to the hardware capabilities through
61 a character device node named /dev/kvm.
63 To compile this as a module, choose M here: the module
69 bool "Compile KVM with -Werror"
70 # Disallow KVM's -Werror if KASAN is enabled, e.g. to guard against
71 # randomized configs from selecting KVM_WERROR=y, which doesn't play
72 # nice with KASAN. KASAN builds generates warnings for the default
73 # FRAME_WARN, i.e. KVM_WERROR=y with KASAN=y requires special tuning.
74 # Building KVM with -Werror and KASAN is still doable via enabling
75 # the kernel-wide WERROR=y.
76 depends on KVM && ((EXPERT && !KASAN) || WERROR)
78 Add -Werror to the build flags for KVM.
82 config KVM_SW_PROTECTED_VM
83 bool "Enable support for KVM software-protected VMs"
85 depends on KVM && X86_64
87 Enable support for KVM software-protected VMs. Currently, software-
88 protected VMs are purely a development and testing vehicle for
89 KVM_CREATE_GUEST_MEMFD. Attempting to run a "real" VM workload as a
90 software-protected VM will fail miserably.
95 tristate "KVM for Intel (and compatible) processors support"
96 depends on KVM && IA32_FEAT_CTL
98 Provides support for KVM on processors equipped with Intel's VT
99 extensions, a.k.a. Virtual Machine Extensions (VMX).
101 To compile this as a module, choose M here: the module
102 will be called kvm-intel.
104 config KVM_INTEL_PROVE_VE
105 bool "Check that guests do not receive #VE exceptions"
106 depends on KVM_INTEL && EXPERT
108 Checks that KVM's page table management code will not incorrectly
109 let guests receive a virtualization exception. Virtualization
110 exceptions will be trapped by the hypervisor rather than injected
113 Note: some CPUs appear to generate spurious EPT Violations #VEs
114 that trigger KVM's WARN, in particular with eptad=0 and/or nested
120 bool "Software Guard eXtensions (SGX) Virtualization"
121 depends on X86_SGX && KVM_INTEL
124 Enables KVM guests to create SGX enclaves.
126 This includes support to expose "raw" unreclaimable enclave memory to
127 guests via a device node, e.g. /dev/sgx_vepc.
132 tristate "KVM for AMD processors support"
133 depends on KVM && (CPU_SUP_AMD || CPU_SUP_HYGON)
135 Provides support for KVM on AMD processors equipped with the AMD-V
138 To compile this as a module, choose M here: the module
139 will be called kvm-amd.
142 bool "AMD Secure Encrypted Virtualization (SEV) support"
144 depends on KVM_AMD && X86_64
145 depends on CRYPTO_DEV_SP_PSP && !(KVM_AMD=y && CRYPTO_DEV_CCP_DD=m)
146 select ARCH_HAS_CC_PLATFORM
147 select KVM_GENERIC_PRIVATE_MEM
148 select HAVE_KVM_ARCH_GMEM_PREPARE
149 select HAVE_KVM_ARCH_GMEM_INVALIDATE
151 Provides support for launching encrypted VMs which use Secure
152 Encrypted Virtualization (SEV), Secure Encrypted Virtualization with
153 Encrypted State (SEV-ES), and Secure Encrypted Virtualization with
154 Secure Nested Paging (SEV-SNP) technologies on AMD processors.
157 bool "System Management Mode emulation"
161 Provides support for KVM to emulate System Management Mode (SMM)
162 in virtual machines. This can be used by the virtual machine
163 firmware to implement UEFI secure boot.
168 bool "Support for Microsoft Hyper-V emulation"
172 Provides KVM support for emulating Microsoft Hyper-V. This allows KVM
173 to expose a subset of the paravirtualized interfaces defined in the
174 Hyper-V Hypervisor Top-Level Functional Specification (TLFS):
175 https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/reference/tlfs
176 These interfaces are required for the correct and performant functioning
177 of Windows and Hyper-V guests on KVM.
182 bool "Support for Xen hypercall interface"
185 Provides KVM support for the hosting Xen HVM guests and
186 passing Xen hypercalls to userspace.
188 If in doubt, say "N".
191 bool "Prove KVM MMU correctness"
192 depends on DEBUG_KERNEL
196 Enables runtime assertions in KVM's MMU that are too costly to enable
197 in anything remotely resembling a production environment, e.g. this
198 gates code that verifies a to-be-freed page table doesn't have any
201 If in doubt, say "N".
203 config KVM_EXTERNAL_WRITE_TRACKING
206 config KVM_MAX_NR_VCPUS
207 int "Maximum number of vCPUs per KVM guest"
210 default 4096 if MAXSMP
213 Set the maximum number of vCPUs per KVM guest. Larger values will increase
214 the memory footprint of each KVM guest, regardless of how many vCPUs are
215 created for a given VM.
217 endif # VIRTUALIZATION