Debian Codegraph @

arch/powerpc/kvm/Kconfig

raw
1 # SPDX-License-Identifier: GPL-2.0
2 #
3 # KVM configuration
4 #
5
6 source "virt/kvm/Kconfig"
7
8 menuconfig VIRTUALIZATION
9 bool "Virtualization"
10 help
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.
14
15 If you say N, all options in this submenu will be skipped and
16 disabled.
17
18 if VIRTUALIZATION
19
20 config KVM
21 bool
22 select KVM_COMMON
23 select KVM_VFIO
24 select HAVE_KVM_IRQ_BYPASS
25
26 config KVM_BOOK3S_HANDLER
27 bool
28
29 config KVM_BOOK3S_32_HANDLER
30 bool
31 select KVM_BOOK3S_HANDLER
32 select KVM_MMIO
33
34 config KVM_BOOK3S_64_HANDLER
35 bool
36 select KVM_BOOK3S_HANDLER
37
38 config KVM_BOOK3S_PR_POSSIBLE
39 bool
40 select KVM_MMIO
41
42 config KVM_BOOK3S_HV_POSSIBLE
43 bool
44
45 config KVM_BOOK3S_32
46 tristate "KVM support for PowerPC book3s_32 processors"
47 depends on PPC_BOOK3S_32 && !SMP && !PTE_64BIT
48 depends on !CONTEXT_TRACKING_USER
49 select KVM
50 select KVM_BOOK3S_32_HANDLER
51 select KVM_BOOK3S_PR_POSSIBLE
52 select PPC_FPU
53 help
54 Support running unmodified book3s_32 guest kernels
55 in virtual machines on book3s_32 host processors.
56
57 This module provides access to the hardware capabilities through
58 a character device node named /dev/kvm.
59
60 If unsure, say N.
61
62 config KVM_BOOK3S_64
63 tristate "KVM support for PowerPC book3s_64 processors"
64 depends on PPC_BOOK3S_64
65 select KVM_BOOK3S_64_HANDLER
66 select KVM
67 select KVM_BOOK3S_PR_POSSIBLE if !KVM_BOOK3S_HV_POSSIBLE
68 select PPC_64S_HASH_MMU
69 select SPAPR_TCE_IOMMU if IOMMU_SUPPORT && (PPC_PSERIES || PPC_POWERNV)
70 help
71 Support running unmodified book3s_64 and book3s_32 guest kernels
72 in virtual machines on book3s_64 host processors.
73
74 This module provides access to the hardware capabilities through
75 a character device node named /dev/kvm.
76
77 If unsure, say N.
78
79 config KVM_BOOK3S_64_HV
80 tristate "KVM for POWER7 and later using hypervisor mode in host"
81 depends on KVM_BOOK3S_64 && PPC_POWERNV
82 select KVM_BOOK3S_HV_POSSIBLE
83 select KVM_BOOK3S_HV_PMU
84 select CMA
85 help
86 Support running unmodified book3s_64 guest kernels in
87 virtual machines on POWER7 and newer processors that have
88 hypervisor mode available to the host.
89
90 If you say Y here, KVM will use the hardware virtualization
91 facilities of POWER7 (and later) processors, meaning that
92 guest operating systems will run at full hardware speed
93 using supervisor and user modes. However, this also means
94 that KVM is not usable under PowerVM (pHyp), is only usable
95 on POWER7 or later processors, and cannot emulate a
96 different processor from the host processor.
97
98 If unsure, say N.
99
100 config KVM_BOOK3S_64_PR
101 tristate "KVM support without using hypervisor mode in host"
102 depends on KVM_BOOK3S_64
103 depends on !CONTEXT_TRACKING_USER
104 select KVM_BOOK3S_PR_POSSIBLE
105 help
106 Support running guest kernels in virtual machines on processors
107 without using hypervisor mode in the host, by running the
108 guest in user mode (problem state) and emulating all
109 privileged instructions and registers.
110
111 This is only available for hash MMU mode and only supports
112 guests that use hash MMU mode.
113
114 This is not as fast as using hypervisor mode, but works on
115 machines where hypervisor mode is not available or not usable,
116 and can emulate processors that are different from the host
117 processor, including emulating 32-bit processors on a 64-bit
118 host.
119
120 Selecting this option will cause the SCV facility to be
121 disabled when the kernel is booted on the pseries platform in
122 hash MMU mode (regardless of PR VMs running). When any PR VMs
123 are running, "AIL" mode is disabled which may slow interrupts
124 and system calls on the host.
125
126 config KVM_BOOK3S_HV_EXIT_TIMING
127 bool
128
129 config KVM_BOOK3S_HV_P9_TIMING
130 bool "Detailed timing for the P9 entry point"
131 select KVM_BOOK3S_HV_EXIT_TIMING
132 depends on KVM_BOOK3S_HV_POSSIBLE && DEBUG_FS
133 help
134 Calculate time taken for each vcpu during vcpu entry and
135 exit, time spent inside the guest and time spent handling
136 hypercalls and page faults. The total, minimum and maximum
137 times in nanoseconds together with the number of executions
138 are reported in debugfs in kvm/vm#/vcpu#/timings.
139
140 If unsure, say N.
141
142 config KVM_BOOK3S_HV_P8_TIMING
143 bool "Detailed timing for hypervisor real-mode code (for POWER8)"
144 select KVM_BOOK3S_HV_EXIT_TIMING
145 depends on KVM_BOOK3S_HV_POSSIBLE && DEBUG_FS && !KVM_BOOK3S_HV_P9_TIMING
146 help
147 Calculate time taken for each vcpu in the real-mode guest entry,
148 exit, and interrupt handling code, plus time spent in the guest
149 and in nap mode due to idle (cede) while other threads are still
150 in the guest. The total, minimum and maximum times in nanoseconds
151 together with the number of executions are reported in debugfs in
152 kvm/vm#/vcpu#/timings. The overhead is of the order of 30 - 40
153 ns per exit on POWER8.
154
155 If unsure, say N.
156
157 config KVM_BOOK3S_HV_NESTED_PMU_WORKAROUND
158 bool "Nested L0 host workaround for L1 KVM host PMU handling bug" if EXPERT
159 depends on KVM_BOOK3S_HV_POSSIBLE
160 default !EXPERT
161 help
162 Old nested HV capable Linux guests have a bug where they don't
163 reflect the PMU in-use status of their L2 guest to the L0 host
164 while the L2 PMU registers are live. This can result in loss
165 of L2 PMU register state, causing perf to not work correctly in
166 L2 guests.
167
168 Selecting this option for the L0 host implements a workaround for
169 those buggy L1s which saves the L2 state, at the cost of performance
170 in all nested-capable guest entry/exit.
171
172 config KVM_BOOK3S_HV_PMU
173 tristate "Hypervisor Perf events for KVM Book3s-HV"
174 depends on KVM_BOOK3S_64_HV
175 help
176 Enable Book3s-HV Hypervisor Perf events PMU named 'kvm-hv'. These
177 Perf events give an overview of hypervisor performance overall
178 instead of a specific guests. Currently the PMU reports
179 L0-Hypervisor stats on a kvm-hv enabled PSeries LPAR like:
180 * Total/Used Guest-Heap
181 * Total/Used Guest Page-table Memory
182 * Total amount of Guest Page-table Memory reclaimed
183
184 config KVM_BOOKE_HV
185 bool
186
187 config KVM_EXIT_TIMING
188 bool "Detailed exit timing"
189 depends on KVM_E500V2 || KVM_E500MC
190 help
191 Calculate elapsed time for every exit/enter cycle. A per-vcpu
192 report is available in debugfs kvm/vm#_vcpu#_timing.
193 The overhead is relatively small, however it is not recommended for
194 production environments.
195
196 If unsure, say N.
197
198 config KVM_E500V2
199 bool "KVM support for PowerPC E500v2 processors"
200 depends on PPC_E500 && !PPC_E500MC
201 depends on !CONTEXT_TRACKING_USER
202 select KVM
203 select KVM_MMIO
204 help
205 Support running unmodified E500 guest kernels in virtual machines on
206 E500v2 host processors.
207
208 This module provides access to the hardware capabilities through
209 a character device node named /dev/kvm.
210
211 If unsure, say N.
212
213 config KVM_E500MC
214 bool "KVM support for PowerPC E500MC/E5500/E6500 processors"
215 depends on PPC_E500MC
216 depends on !CONTEXT_TRACKING_USER
217 select KVM
218 select KVM_MMIO
219 select KVM_BOOKE_HV
220 help
221 Support running unmodified E500MC/E5500/E6500 guest kernels in
222 virtual machines on E500MC/E5500/E6500 host processors.
223
224 This module provides access to the hardware capabilities through
225 a character device node named /dev/kvm.
226
227 If unsure, say N.
228
229 config KVM_MPIC
230 bool "KVM in-kernel MPIC emulation"
231 depends on KVM && PPC_E500
232 select HAVE_KVM_IRQCHIP
233 select HAVE_KVM_IRQ_ROUTING
234 select HAVE_KVM_MSI
235 help
236 Enable support for emulating MPIC devices inside the
237 host kernel, rather than relying on userspace to emulate.
238 Currently, support is limited to certain versions of
239 Freescale's MPIC implementation.
240
241 config KVM_XICS
242 bool "KVM in-kernel XICS emulation"
243 depends on KVM_BOOK3S_64 && !KVM_MPIC
244 select HAVE_KVM_IRQCHIP
245 default y
246 help
247 Include support for the XICS (eXternal Interrupt Controller
248 Specification) interrupt controller architecture used on
249 IBM POWER (pSeries) servers.
250
251 config KVM_XIVE
252 bool
253 default y
254 depends on KVM_XICS && PPC_XIVE_NATIVE && KVM_BOOK3S_HV_POSSIBLE
255
256 endif # VIRTUALIZATION