162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 262306a36Sopenharmony_ci# 362306a36Sopenharmony_ci# KVM configuration 462306a36Sopenharmony_ci# 562306a36Sopenharmony_ci 662306a36Sopenharmony_cisource "virt/kvm/Kconfig" 762306a36Sopenharmony_ci 862306a36Sopenharmony_cimenuconfig VIRTUALIZATION 962306a36Sopenharmony_ci bool "Virtualization" 1062306a36Sopenharmony_ci depends on HAVE_KVM || X86 1162306a36Sopenharmony_ci default y 1262306a36Sopenharmony_ci help 1362306a36Sopenharmony_ci Say Y here to get to see options for using your Linux host to run other 1462306a36Sopenharmony_ci operating systems inside virtual machines (guests). 1562306a36Sopenharmony_ci This option alone does not add any kernel code. 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ci If you say N, all options in this submenu will be skipped and disabled. 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ciif VIRTUALIZATION 2062306a36Sopenharmony_ci 2162306a36Sopenharmony_ciconfig KVM 2262306a36Sopenharmony_ci tristate "Kernel-based Virtual Machine (KVM) support" 2362306a36Sopenharmony_ci depends on HAVE_KVM 2462306a36Sopenharmony_ci depends on HIGH_RES_TIMERS 2562306a36Sopenharmony_ci depends on X86_LOCAL_APIC 2662306a36Sopenharmony_ci select PREEMPT_NOTIFIERS 2762306a36Sopenharmony_ci select MMU_NOTIFIER 2862306a36Sopenharmony_ci select HAVE_KVM_IRQCHIP 2962306a36Sopenharmony_ci select HAVE_KVM_PFNCACHE 3062306a36Sopenharmony_ci select HAVE_KVM_IRQFD 3162306a36Sopenharmony_ci select HAVE_KVM_DIRTY_RING_TSO 3262306a36Sopenharmony_ci select HAVE_KVM_DIRTY_RING_ACQ_REL 3362306a36Sopenharmony_ci select IRQ_BYPASS_MANAGER 3462306a36Sopenharmony_ci select HAVE_KVM_IRQ_BYPASS 3562306a36Sopenharmony_ci select HAVE_KVM_IRQ_ROUTING 3662306a36Sopenharmony_ci select HAVE_KVM_EVENTFD 3762306a36Sopenharmony_ci select KVM_ASYNC_PF 3862306a36Sopenharmony_ci select USER_RETURN_NOTIFIER 3962306a36Sopenharmony_ci select KVM_MMIO 4062306a36Sopenharmony_ci select SCHED_INFO 4162306a36Sopenharmony_ci select PERF_EVENTS 4262306a36Sopenharmony_ci select GUEST_PERF_EVENTS 4362306a36Sopenharmony_ci select HAVE_KVM_MSI 4462306a36Sopenharmony_ci select HAVE_KVM_CPU_RELAX_INTERCEPT 4562306a36Sopenharmony_ci select HAVE_KVM_NO_POLL 4662306a36Sopenharmony_ci select KVM_XFER_TO_GUEST_WORK 4762306a36Sopenharmony_ci select KVM_GENERIC_DIRTYLOG_READ_PROTECT 4862306a36Sopenharmony_ci select KVM_VFIO 4962306a36Sopenharmony_ci select INTERVAL_TREE 5062306a36Sopenharmony_ci select HAVE_KVM_PM_NOTIFIER if PM 5162306a36Sopenharmony_ci select KVM_GENERIC_HARDWARE_ENABLING 5262306a36Sopenharmony_ci help 5362306a36Sopenharmony_ci Support hosting fully virtualized guest machines using hardware 5462306a36Sopenharmony_ci virtualization extensions. You will need a fairly recent 5562306a36Sopenharmony_ci processor equipped with virtualization extensions. You will also 5662306a36Sopenharmony_ci need to select one or more of the processor modules below. 5762306a36Sopenharmony_ci 5862306a36Sopenharmony_ci This module provides access to the hardware capabilities through 5962306a36Sopenharmony_ci a character device node named /dev/kvm. 6062306a36Sopenharmony_ci 6162306a36Sopenharmony_ci To compile this as a module, choose M here: the module 6262306a36Sopenharmony_ci will be called kvm. 6362306a36Sopenharmony_ci 6462306a36Sopenharmony_ci If unsure, say N. 6562306a36Sopenharmony_ci 6662306a36Sopenharmony_ciconfig KVM_WERROR 6762306a36Sopenharmony_ci bool "Compile KVM with -Werror" 6862306a36Sopenharmony_ci # KASAN may cause the build to fail due to larger frames 6962306a36Sopenharmony_ci default y if X86_64 && !KASAN 7062306a36Sopenharmony_ci # We use the dependency on !COMPILE_TEST to not be enabled 7162306a36Sopenharmony_ci # blindly in allmodconfig or allyesconfig configurations 7262306a36Sopenharmony_ci depends on KVM 7362306a36Sopenharmony_ci depends on (X86_64 && !KASAN) || !COMPILE_TEST 7462306a36Sopenharmony_ci depends on EXPERT 7562306a36Sopenharmony_ci help 7662306a36Sopenharmony_ci Add -Werror to the build flags for KVM. 7762306a36Sopenharmony_ci 7862306a36Sopenharmony_ci If in doubt, say "N". 7962306a36Sopenharmony_ci 8062306a36Sopenharmony_ciconfig KVM_INTEL 8162306a36Sopenharmony_ci tristate "KVM for Intel (and compatible) processors support" 8262306a36Sopenharmony_ci depends on KVM && IA32_FEAT_CTL 8362306a36Sopenharmony_ci help 8462306a36Sopenharmony_ci Provides support for KVM on processors equipped with Intel's VT 8562306a36Sopenharmony_ci extensions, a.k.a. Virtual Machine Extensions (VMX). 8662306a36Sopenharmony_ci 8762306a36Sopenharmony_ci To compile this as a module, choose M here: the module 8862306a36Sopenharmony_ci will be called kvm-intel. 8962306a36Sopenharmony_ci 9062306a36Sopenharmony_ciconfig X86_SGX_KVM 9162306a36Sopenharmony_ci bool "Software Guard eXtensions (SGX) Virtualization" 9262306a36Sopenharmony_ci depends on X86_SGX && KVM_INTEL 9362306a36Sopenharmony_ci help 9462306a36Sopenharmony_ci 9562306a36Sopenharmony_ci Enables KVM guests to create SGX enclaves. 9662306a36Sopenharmony_ci 9762306a36Sopenharmony_ci This includes support to expose "raw" unreclaimable enclave memory to 9862306a36Sopenharmony_ci guests via a device node, e.g. /dev/sgx_vepc. 9962306a36Sopenharmony_ci 10062306a36Sopenharmony_ci If unsure, say N. 10162306a36Sopenharmony_ci 10262306a36Sopenharmony_ciconfig KVM_AMD 10362306a36Sopenharmony_ci tristate "KVM for AMD processors support" 10462306a36Sopenharmony_ci depends on KVM && (CPU_SUP_AMD || CPU_SUP_HYGON) 10562306a36Sopenharmony_ci help 10662306a36Sopenharmony_ci Provides support for KVM on AMD processors equipped with the AMD-V 10762306a36Sopenharmony_ci (SVM) extensions. 10862306a36Sopenharmony_ci 10962306a36Sopenharmony_ci To compile this as a module, choose M here: the module 11062306a36Sopenharmony_ci will be called kvm-amd. 11162306a36Sopenharmony_ci 11262306a36Sopenharmony_ciconfig KVM_AMD_SEV 11362306a36Sopenharmony_ci def_bool y 11462306a36Sopenharmony_ci bool "AMD Secure Encrypted Virtualization (SEV) support" 11562306a36Sopenharmony_ci depends on KVM_AMD && X86_64 11662306a36Sopenharmony_ci depends on CRYPTO_DEV_SP_PSP && !(KVM_AMD=y && CRYPTO_DEV_CCP_DD=m) 11762306a36Sopenharmony_ci help 11862306a36Sopenharmony_ci Provides support for launching Encrypted VMs (SEV) and Encrypted VMs 11962306a36Sopenharmony_ci with Encrypted State (SEV-ES) on AMD processors. 12062306a36Sopenharmony_ci 12162306a36Sopenharmony_ciconfig KVM_SMM 12262306a36Sopenharmony_ci bool "System Management Mode emulation" 12362306a36Sopenharmony_ci default y 12462306a36Sopenharmony_ci depends on KVM 12562306a36Sopenharmony_ci help 12662306a36Sopenharmony_ci Provides support for KVM to emulate System Management Mode (SMM) 12762306a36Sopenharmony_ci in virtual machines. This can be used by the virtual machine 12862306a36Sopenharmony_ci firmware to implement UEFI secure boot. 12962306a36Sopenharmony_ci 13062306a36Sopenharmony_ci If unsure, say Y. 13162306a36Sopenharmony_ci 13262306a36Sopenharmony_ciconfig KVM_XEN 13362306a36Sopenharmony_ci bool "Support for Xen hypercall interface" 13462306a36Sopenharmony_ci depends on KVM 13562306a36Sopenharmony_ci help 13662306a36Sopenharmony_ci Provides KVM support for the hosting Xen HVM guests and 13762306a36Sopenharmony_ci passing Xen hypercalls to userspace. 13862306a36Sopenharmony_ci 13962306a36Sopenharmony_ci If in doubt, say "N". 14062306a36Sopenharmony_ci 14162306a36Sopenharmony_ciconfig KVM_PROVE_MMU 14262306a36Sopenharmony_ci bool "Prove KVM MMU correctness" 14362306a36Sopenharmony_ci depends on DEBUG_KERNEL 14462306a36Sopenharmony_ci depends on KVM 14562306a36Sopenharmony_ci depends on EXPERT 14662306a36Sopenharmony_ci help 14762306a36Sopenharmony_ci Enables runtime assertions in KVM's MMU that are too costly to enable 14862306a36Sopenharmony_ci in anything remotely resembling a production environment, e.g. this 14962306a36Sopenharmony_ci gates code that verifies a to-be-freed page table doesn't have any 15062306a36Sopenharmony_ci present SPTEs. 15162306a36Sopenharmony_ci 15262306a36Sopenharmony_ci If in doubt, say "N". 15362306a36Sopenharmony_ci 15462306a36Sopenharmony_ciconfig KVM_EXTERNAL_WRITE_TRACKING 15562306a36Sopenharmony_ci bool 15662306a36Sopenharmony_ci 15762306a36Sopenharmony_ciendif # VIRTUALIZATION 158