Kconfig 7.5 KB

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