xref: /OK3568_Linux_fs/kernel/arch/x86/kvm/Kconfig (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0
2*4882a593Smuzhiyun#
3*4882a593Smuzhiyun# KVM configuration
4*4882a593Smuzhiyun#
5*4882a593Smuzhiyun
6*4882a593Smuzhiyunsource "virt/kvm/Kconfig"
7*4882a593Smuzhiyun
8*4882a593Smuzhiyunmenuconfig VIRTUALIZATION
9*4882a593Smuzhiyun	bool "Virtualization"
10*4882a593Smuzhiyun	depends on HAVE_KVM || X86
11*4882a593Smuzhiyun	default y
12*4882a593Smuzhiyun	help
13*4882a593Smuzhiyun	  Say Y here to get to see options for using your Linux host to run other
14*4882a593Smuzhiyun	  operating systems inside virtual machines (guests).
15*4882a593Smuzhiyun	  This option alone does not add any kernel code.
16*4882a593Smuzhiyun
17*4882a593Smuzhiyun	  If you say N, all options in this submenu will be skipped and disabled.
18*4882a593Smuzhiyun
19*4882a593Smuzhiyunif VIRTUALIZATION
20*4882a593Smuzhiyun
21*4882a593Smuzhiyunconfig KVM
22*4882a593Smuzhiyun	tristate "Kernel-based Virtual Machine (KVM) support"
23*4882a593Smuzhiyun	depends on HAVE_KVM
24*4882a593Smuzhiyun	depends on HIGH_RES_TIMERS
25*4882a593Smuzhiyun	# for TASKSTATS/TASK_DELAY_ACCT:
26*4882a593Smuzhiyun	depends on NET && MULTIUSER
27*4882a593Smuzhiyun	depends on X86_LOCAL_APIC
28*4882a593Smuzhiyun	select PREEMPT_NOTIFIERS
29*4882a593Smuzhiyun	select MMU_NOTIFIER
30*4882a593Smuzhiyun	select HAVE_KVM_IRQCHIP
31*4882a593Smuzhiyun	select HAVE_KVM_IRQFD
32*4882a593Smuzhiyun	select IRQ_BYPASS_MANAGER
33*4882a593Smuzhiyun	select HAVE_KVM_IRQ_BYPASS
34*4882a593Smuzhiyun	select HAVE_KVM_IRQ_ROUTING
35*4882a593Smuzhiyun	select HAVE_KVM_EVENTFD
36*4882a593Smuzhiyun	select KVM_ASYNC_PF
37*4882a593Smuzhiyun	select USER_RETURN_NOTIFIER
38*4882a593Smuzhiyun	select KVM_MMIO
39*4882a593Smuzhiyun	select TASKSTATS
40*4882a593Smuzhiyun	select TASK_DELAY_ACCT
41*4882a593Smuzhiyun	select PERF_EVENTS
42*4882a593Smuzhiyun	select HAVE_KVM_MSI
43*4882a593Smuzhiyun	select HAVE_KVM_CPU_RELAX_INTERCEPT
44*4882a593Smuzhiyun	select HAVE_KVM_NO_POLL
45*4882a593Smuzhiyun	select KVM_XFER_TO_GUEST_WORK
46*4882a593Smuzhiyun	select KVM_GENERIC_DIRTYLOG_READ_PROTECT
47*4882a593Smuzhiyun	select KVM_VFIO
48*4882a593Smuzhiyun	select SRCU
49*4882a593Smuzhiyun	help
50*4882a593Smuzhiyun	  Support hosting fully virtualized guest machines using hardware
51*4882a593Smuzhiyun	  virtualization extensions.  You will need a fairly recent
52*4882a593Smuzhiyun	  processor equipped with virtualization extensions. You will also
53*4882a593Smuzhiyun	  need to select one or more of the processor modules below.
54*4882a593Smuzhiyun
55*4882a593Smuzhiyun	  This module provides access to the hardware capabilities through
56*4882a593Smuzhiyun	  a character device node named /dev/kvm.
57*4882a593Smuzhiyun
58*4882a593Smuzhiyun	  To compile this as a module, choose M here: the module
59*4882a593Smuzhiyun	  will be called kvm.
60*4882a593Smuzhiyun
61*4882a593Smuzhiyun	  If unsure, say N.
62*4882a593Smuzhiyun
63*4882a593Smuzhiyunconfig KVM_WERROR
64*4882a593Smuzhiyun	bool "Compile KVM with -Werror"
65*4882a593Smuzhiyun	# KASAN may cause the build to fail due to larger frames
66*4882a593Smuzhiyun	default y if X86_64 && !KASAN
67*4882a593Smuzhiyun	# We use the dependency on !COMPILE_TEST to not be enabled
68*4882a593Smuzhiyun	# blindly in allmodconfig or allyesconfig configurations
69*4882a593Smuzhiyun	depends on KVM
70*4882a593Smuzhiyun	depends on (X86_64 && !KASAN) || !COMPILE_TEST
71*4882a593Smuzhiyun	depends on EXPERT
72*4882a593Smuzhiyun	help
73*4882a593Smuzhiyun	  Add -Werror to the build flags for KVM.
74*4882a593Smuzhiyun
75*4882a593Smuzhiyun	  If in doubt, say "N".
76*4882a593Smuzhiyun
77*4882a593Smuzhiyunconfig KVM_INTEL
78*4882a593Smuzhiyun	tristate "KVM for Intel (and compatible) processors support"
79*4882a593Smuzhiyun	depends on KVM && IA32_FEAT_CTL
80*4882a593Smuzhiyun	help
81*4882a593Smuzhiyun	  Provides support for KVM on processors equipped with Intel's VT
82*4882a593Smuzhiyun	  extensions, a.k.a. Virtual Machine Extensions (VMX).
83*4882a593Smuzhiyun
84*4882a593Smuzhiyun	  To compile this as a module, choose M here: the module
85*4882a593Smuzhiyun	  will be called kvm-intel.
86*4882a593Smuzhiyun
87*4882a593Smuzhiyunconfig KVM_AMD
88*4882a593Smuzhiyun	tristate "KVM for AMD processors support"
89*4882a593Smuzhiyun	depends on KVM
90*4882a593Smuzhiyun	help
91*4882a593Smuzhiyun	  Provides support for KVM on AMD processors equipped with the AMD-V
92*4882a593Smuzhiyun	  (SVM) extensions.
93*4882a593Smuzhiyun
94*4882a593Smuzhiyun	  To compile this as a module, choose M here: the module
95*4882a593Smuzhiyun	  will be called kvm-amd.
96*4882a593Smuzhiyun
97*4882a593Smuzhiyunconfig KVM_AMD_SEV
98*4882a593Smuzhiyun	def_bool y
99*4882a593Smuzhiyun	bool "AMD Secure Encrypted Virtualization (SEV) support"
100*4882a593Smuzhiyun	depends on KVM_AMD && X86_64
101*4882a593Smuzhiyun	depends on CRYPTO_DEV_SP_PSP && !(KVM_AMD=y && CRYPTO_DEV_CCP_DD=m)
102*4882a593Smuzhiyun	help
103*4882a593Smuzhiyun	Provides support for launching Encrypted VMs on AMD processors.
104*4882a593Smuzhiyun
105*4882a593Smuzhiyunconfig KVM_MMU_AUDIT
106*4882a593Smuzhiyun	bool "Audit KVM MMU"
107*4882a593Smuzhiyun	depends on KVM && TRACEPOINTS
108*4882a593Smuzhiyun	help
109*4882a593Smuzhiyun	 This option adds a R/W kVM module parameter 'mmu_audit', which allows
110*4882a593Smuzhiyun	 auditing of KVM MMU events at runtime.
111*4882a593Smuzhiyun
112*4882a593Smuzhiyunendif # VIRTUALIZATION
113