Kconfig 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  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. config KVM_BOOK3S_HANDLER
  25. bool
  26. config KVM_BOOK3S_32_HANDLER
  27. bool
  28. select KVM_BOOK3S_HANDLER
  29. select KVM_MMIO
  30. config KVM_BOOK3S_64_HANDLER
  31. bool
  32. select KVM_BOOK3S_HANDLER
  33. select PPC_DAWR_FORCE_ENABLE
  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. select KVM
  44. select KVM_BOOK3S_32_HANDLER
  45. select KVM_BOOK3S_PR_POSSIBLE
  46. help
  47. Support running unmodified book3s_32 guest kernels
  48. in virtual machines on book3s_32 host processors.
  49. This module provides access to the hardware capabilities through
  50. a character device node named /dev/kvm.
  51. If unsure, say N.
  52. config KVM_BOOK3S_64
  53. tristate "KVM support for PowerPC book3s_64 processors"
  54. depends on PPC_BOOK3S_64
  55. select KVM_BOOK3S_64_HANDLER
  56. select KVM
  57. select KVM_BOOK3S_PR_POSSIBLE if !KVM_BOOK3S_HV_POSSIBLE
  58. select SPAPR_TCE_IOMMU if IOMMU_SUPPORT && (PPC_PSERIES || PPC_POWERNV)
  59. help
  60. Support running unmodified book3s_64 and book3s_32 guest kernels
  61. in virtual machines on book3s_64 host processors.
  62. This module provides access to the hardware capabilities through
  63. a character device node named /dev/kvm.
  64. If unsure, say N.
  65. config KVM_BOOK3S_64_HV
  66. tristate "KVM for POWER7 and later using hypervisor mode in host"
  67. depends on KVM_BOOK3S_64 && PPC_POWERNV
  68. select KVM_BOOK3S_HV_POSSIBLE
  69. select MMU_NOTIFIER
  70. select CMA
  71. help
  72. Support running unmodified book3s_64 guest kernels in
  73. virtual machines on POWER7 and newer processors that have
  74. hypervisor mode available to the host.
  75. If you say Y here, KVM will use the hardware virtualization
  76. facilities of POWER7 (and later) processors, meaning that
  77. guest operating systems will run at full hardware speed
  78. using supervisor and user modes. However, this also means
  79. that KVM is not usable under PowerVM (pHyp), is only usable
  80. on POWER7 or later processors, and cannot emulate a
  81. different processor from the host processor.
  82. If unsure, say N.
  83. config KVM_BOOK3S_64_PR
  84. tristate "KVM support without using hypervisor mode in host"
  85. depends on KVM_BOOK3S_64
  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 not as fast as using hypervisor mode, but works on
  93. machines where hypervisor mode is not available or not usable,
  94. and can emulate processors that are different from the host
  95. processor, including emulating 32-bit processors on a 64-bit
  96. host.
  97. config KVM_BOOK3S_HV_EXIT_TIMING
  98. bool "Detailed timing for hypervisor real-mode code"
  99. depends on KVM_BOOK3S_HV_POSSIBLE && DEBUG_FS
  100. help
  101. Calculate time taken for each vcpu in the real-mode guest entry,
  102. exit, and interrupt handling code, plus time spent in the guest
  103. and in nap mode due to idle (cede) while other threads are still
  104. in the guest. The total, minimum and maximum times in nanoseconds
  105. together with the number of executions are reported in debugfs in
  106. kvm/vm#/vcpu#/timings. The overhead is of the order of 30 - 40
  107. ns per exit on POWER8.
  108. If unsure, say N.
  109. config KVM_BOOKE_HV
  110. bool
  111. config KVM_EXIT_TIMING
  112. bool "Detailed exit timing"
  113. depends on KVM_E500V2 || KVM_E500MC
  114. help
  115. Calculate elapsed time for every exit/enter cycle. A per-vcpu
  116. report is available in debugfs kvm/vm#_vcpu#_timing.
  117. The overhead is relatively small, however it is not recommended for
  118. production environments.
  119. If unsure, say N.
  120. config KVM_E500V2
  121. bool "KVM support for PowerPC E500v2 processors"
  122. depends on E500 && !PPC_E500MC
  123. select KVM
  124. select KVM_MMIO
  125. select MMU_NOTIFIER
  126. help
  127. Support running unmodified E500 guest kernels in virtual machines on
  128. E500v2 host processors.
  129. This module provides access to the hardware capabilities through
  130. a character device node named /dev/kvm.
  131. If unsure, say N.
  132. config KVM_E500MC
  133. bool "KVM support for PowerPC E500MC/E5500/E6500 processors"
  134. depends on PPC_E500MC
  135. select KVM
  136. select KVM_MMIO
  137. select KVM_BOOKE_HV
  138. select MMU_NOTIFIER
  139. help
  140. Support running unmodified E500MC/E5500/E6500 guest kernels in
  141. virtual machines on E500MC/E5500/E6500 host processors.
  142. This module provides access to the hardware capabilities through
  143. a character device node named /dev/kvm.
  144. If unsure, say N.
  145. config KVM_MPIC
  146. bool "KVM in-kernel MPIC emulation"
  147. depends on KVM && E500
  148. select HAVE_KVM_IRQCHIP
  149. select HAVE_KVM_IRQFD
  150. select HAVE_KVM_IRQ_ROUTING
  151. select HAVE_KVM_MSI
  152. help
  153. Enable support for emulating MPIC devices inside the
  154. host kernel, rather than relying on userspace to emulate.
  155. Currently, support is limited to certain versions of
  156. Freescale's MPIC implementation.
  157. config KVM_XICS
  158. bool "KVM in-kernel XICS emulation"
  159. depends on KVM_BOOK3S_64 && !KVM_MPIC
  160. select HAVE_KVM_IRQCHIP
  161. select HAVE_KVM_IRQFD
  162. default y
  163. help
  164. Include support for the XICS (eXternal Interrupt Controller
  165. Specification) interrupt controller architecture used on
  166. IBM POWER (pSeries) servers.
  167. config KVM_XIVE
  168. bool
  169. default y
  170. depends on KVM_XICS && PPC_XIVE_NATIVE && KVM_BOOK3S_HV_POSSIBLE
  171. endif # VIRTUALIZATION