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