Kconfig 7.6 KB

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