1 # SPDX-License-Identifier: GPL-2.0
6 source "virt/kvm/Kconfig"
8 menuconfig VIRTUALIZATION
11 Say Y here to get to see options for using your Linux host to run
12 other operating systems inside virtual machines (guests).
13 This option alone does not add any kernel code.
15 If you say N, all options in this submenu will be skipped and
23 select HAVE_KVM_VCPU_ASYNC_IOCTL
25 select HAVE_KVM_IRQ_BYPASS
27 config KVM_BOOK3S_HANDLER
30 config KVM_BOOK3S_32_HANDLER
32 select KVM_BOOK3S_HANDLER
35 config KVM_BOOK3S_64_HANDLER
37 select KVM_BOOK3S_HANDLER
39 config KVM_BOOK3S_PR_POSSIBLE
42 select KVM_GENERIC_MMU_NOTIFIER
44 config KVM_BOOK3S_HV_POSSIBLE
48 tristate "KVM support for PowerPC book3s_32 processors"
49 depends on PPC_BOOK3S_32 && !SMP && !PTE_64BIT
50 depends on !CONTEXT_TRACKING_USER
52 select KVM_BOOK3S_32_HANDLER
53 select KVM_BOOK3S_PR_POSSIBLE
56 Support running unmodified book3s_32 guest kernels
57 in virtual machines on book3s_32 host processors.
59 This module provides access to the hardware capabilities through
60 a character device node named /dev/kvm.
65 tristate "KVM support for PowerPC book3s_64 processors"
66 depends on PPC_BOOK3S_64
67 select KVM_BOOK3S_64_HANDLER
69 select KVM_BOOK3S_PR_POSSIBLE if !KVM_BOOK3S_HV_POSSIBLE
70 select PPC_64S_HASH_MMU
71 select SPAPR_TCE_IOMMU if IOMMU_SUPPORT && (PPC_PSERIES || PPC_POWERNV)
73 Support running unmodified book3s_64 and book3s_32 guest kernels
74 in virtual machines on book3s_64 host processors.
76 This module provides access to the hardware capabilities through
77 a character device node named /dev/kvm.
81 config KVM_BOOK3S_64_HV
82 tristate "KVM for POWER7 and later using hypervisor mode in host"
83 depends on KVM_BOOK3S_64 && PPC_POWERNV
84 select KVM_BOOK3S_HV_POSSIBLE
85 select KVM_GENERIC_MMU_NOTIFIER
88 Support running unmodified book3s_64 guest kernels in
89 virtual machines on POWER7 and newer processors that have
90 hypervisor mode available to the host.
92 If you say Y here, KVM will use the hardware virtualization
93 facilities of POWER7 (and later) processors, meaning that
94 guest operating systems will run at full hardware speed
95 using supervisor and user modes. However, this also means
96 that KVM is not usable under PowerVM (pHyp), is only usable
97 on POWER7 or later processors, and cannot emulate a
98 different processor from the host processor.
102 config KVM_BOOK3S_64_PR
103 tristate "KVM support without using hypervisor mode in host"
104 depends on KVM_BOOK3S_64
105 depends on !CONTEXT_TRACKING_USER
106 select KVM_BOOK3S_PR_POSSIBLE
108 Support running guest kernels in virtual machines on processors
109 without using hypervisor mode in the host, by running the
110 guest in user mode (problem state) and emulating all
111 privileged instructions and registers.
113 This is only available for hash MMU mode and only supports
114 guests that use hash MMU mode.
116 This is not as fast as using hypervisor mode, but works on
117 machines where hypervisor mode is not available or not usable,
118 and can emulate processors that are different from the host
119 processor, including emulating 32-bit processors on a 64-bit
122 Selecting this option will cause the SCV facility to be
123 disabled when the kernel is booted on the pseries platform in
124 hash MMU mode (regardless of PR VMs running). When any PR VMs
125 are running, "AIL" mode is disabled which may slow interrupts
126 and system calls on the host.
128 config KVM_BOOK3S_HV_EXIT_TIMING
131 config KVM_BOOK3S_HV_P9_TIMING
132 bool "Detailed timing for the P9 entry point"
133 select KVM_BOOK3S_HV_EXIT_TIMING
134 depends on KVM_BOOK3S_HV_POSSIBLE && DEBUG_FS
136 Calculate time taken for each vcpu during vcpu entry and
137 exit, time spent inside the guest and time spent handling
138 hypercalls and page faults. The total, minimum and maximum
139 times in nanoseconds together with the number of executions
140 are reported in debugfs in kvm/vm#/vcpu#/timings.
144 config KVM_BOOK3S_HV_P8_TIMING
145 bool "Detailed timing for hypervisor real-mode code (for POWER8)"
146 select KVM_BOOK3S_HV_EXIT_TIMING
147 depends on KVM_BOOK3S_HV_POSSIBLE && DEBUG_FS && !KVM_BOOK3S_HV_P9_TIMING
149 Calculate time taken for each vcpu in the real-mode guest entry,
150 exit, and interrupt handling code, plus time spent in the guest
151 and in nap mode due to idle (cede) while other threads are still
152 in the guest. The total, minimum and maximum times in nanoseconds
153 together with the number of executions are reported in debugfs in
154 kvm/vm#/vcpu#/timings. The overhead is of the order of 30 - 40
155 ns per exit on POWER8.
159 config KVM_BOOK3S_HV_NESTED_PMU_WORKAROUND
160 bool "Nested L0 host workaround for L1 KVM host PMU handling bug" if EXPERT
161 depends on KVM_BOOK3S_HV_POSSIBLE
164 Old nested HV capable Linux guests have a bug where they don't
165 reflect the PMU in-use status of their L2 guest to the L0 host
166 while the L2 PMU registers are live. This can result in loss
167 of L2 PMU register state, causing perf to not work correctly in
170 Selecting this option for the L0 host implements a workaround for
171 those buggy L1s which saves the L2 state, at the cost of performance
172 in all nested-capable guest entry/exit.
177 config KVM_EXIT_TIMING
178 bool "Detailed exit timing"
179 depends on KVM_E500V2 || KVM_E500MC
181 Calculate elapsed time for every exit/enter cycle. A per-vcpu
182 report is available in debugfs kvm/vm#_vcpu#_timing.
183 The overhead is relatively small, however it is not recommended for
184 production environments.
189 bool "KVM support for PowerPC E500v2 processors"
190 depends on PPC_E500 && !PPC_E500MC
191 depends on !CONTEXT_TRACKING_USER
194 select KVM_GENERIC_MMU_NOTIFIER
196 Support running unmodified E500 guest kernels in virtual machines on
197 E500v2 host processors.
199 This module provides access to the hardware capabilities through
200 a character device node named /dev/kvm.
205 bool "KVM support for PowerPC E500MC/E5500/E6500 processors"
206 depends on PPC_E500MC
207 depends on !CONTEXT_TRACKING_USER
211 select KVM_GENERIC_MMU_NOTIFIER
213 Support running unmodified E500MC/E5500/E6500 guest kernels in
214 virtual machines on E500MC/E5500/E6500 host processors.
216 This module provides access to the hardware capabilities through
217 a character device node named /dev/kvm.
222 bool "KVM in-kernel MPIC emulation"
223 depends on KVM && PPC_E500
224 select HAVE_KVM_IRQCHIP
225 select HAVE_KVM_IRQ_ROUTING
228 Enable support for emulating MPIC devices inside the
229 host kernel, rather than relying on userspace to emulate.
230 Currently, support is limited to certain versions of
231 Freescale's MPIC implementation.
234 bool "KVM in-kernel XICS emulation"
235 depends on KVM_BOOK3S_64 && !KVM_MPIC
236 select HAVE_KVM_IRQCHIP
239 Include support for the XICS (eXternal Interrupt Controller
240 Specification) interrupt controller architecture used on
241 IBM POWER (pSeries) servers.
246 depends on KVM_XICS && PPC_XIVE_NATIVE && KVM_BOOK3S_HV_POSSIBLE
248 endif # VIRTUALIZATION