Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0
0002 #
0003 # KVM configuration
0004 #
0005 
0006 source "virt/kvm/Kconfig"
0007 
0008 menuconfig VIRTUALIZATION
0009         bool "Virtualization"
0010         help
0011           Say Y here to get to see options for using your Linux host to run
0012           other operating systems inside virtual machines (guests).
0013           This option alone does not add any kernel code.
0014 
0015           If you say N, all options in this submenu will be skipped and
0016           disabled.
0017 
0018 if VIRTUALIZATION
0019 
0020 config KVM
0021         bool
0022         select PREEMPT_NOTIFIERS
0023         select HAVE_KVM_EVENTFD
0024         select HAVE_KVM_VCPU_ASYNC_IOCTL
0025         select SRCU
0026         select KVM_VFIO
0027         select IRQ_BYPASS_MANAGER
0028         select HAVE_KVM_IRQ_BYPASS
0029         select INTERVAL_TREE
0030 
0031 config KVM_BOOK3S_HANDLER
0032         bool
0033 
0034 config KVM_BOOK3S_32_HANDLER
0035         bool
0036         select KVM_BOOK3S_HANDLER
0037         select KVM_MMIO
0038 
0039 config KVM_BOOK3S_64_HANDLER
0040         bool
0041         select KVM_BOOK3S_HANDLER
0042 
0043 config KVM_BOOK3S_PR_POSSIBLE
0044         bool
0045         select KVM_MMIO
0046         select MMU_NOTIFIER
0047 
0048 config KVM_BOOK3S_HV_POSSIBLE
0049         bool
0050 
0051 config KVM_BOOK3S_32
0052         tristate "KVM support for PowerPC book3s_32 processors"
0053         depends on PPC_BOOK3S_32 && !SMP && !PTE_64BIT
0054         select KVM
0055         select KVM_BOOK3S_32_HANDLER
0056         select KVM_BOOK3S_PR_POSSIBLE
0057         select PPC_FPU
0058         help
0059           Support running unmodified book3s_32 guest kernels
0060           in virtual machines on book3s_32 host processors.
0061 
0062           This module provides access to the hardware capabilities through
0063           a character device node named /dev/kvm.
0064 
0065           If unsure, say N.
0066 
0067 config KVM_BOOK3S_64
0068         tristate "KVM support for PowerPC book3s_64 processors"
0069         depends on PPC_BOOK3S_64
0070         select KVM_BOOK3S_64_HANDLER
0071         select KVM
0072         select KVM_BOOK3S_PR_POSSIBLE if !KVM_BOOK3S_HV_POSSIBLE
0073         select PPC_64S_HASH_MMU
0074         select SPAPR_TCE_IOMMU if IOMMU_SUPPORT && (PPC_PSERIES || PPC_POWERNV)
0075         help
0076           Support running unmodified book3s_64 and book3s_32 guest kernels
0077           in virtual machines on book3s_64 host processors.
0078 
0079           This module provides access to the hardware capabilities through
0080           a character device node named /dev/kvm.
0081 
0082           If unsure, say N.
0083 
0084 config KVM_BOOK3S_64_HV
0085         tristate "KVM for POWER7 and later using hypervisor mode in host"
0086         depends on KVM_BOOK3S_64 && PPC_POWERNV
0087         select KVM_BOOK3S_HV_POSSIBLE
0088         select MMU_NOTIFIER
0089         select CMA
0090         help
0091           Support running unmodified book3s_64 guest kernels in
0092           virtual machines on POWER7 and newer processors that have
0093           hypervisor mode available to the host.
0094 
0095           If you say Y here, KVM will use the hardware virtualization
0096           facilities of POWER7 (and later) processors, meaning that
0097           guest operating systems will run at full hardware speed
0098           using supervisor and user modes.  However, this also means
0099           that KVM is not usable under PowerVM (pHyp), is only usable
0100           on POWER7 or later processors, and cannot emulate a
0101           different processor from the host processor.
0102 
0103           If unsure, say N.
0104 
0105 config KVM_BOOK3S_64_PR
0106         tristate "KVM support without using hypervisor mode in host"
0107         depends on KVM_BOOK3S_64
0108         select KVM_BOOK3S_PR_POSSIBLE
0109         help
0110           Support running guest kernels in virtual machines on processors
0111           without using hypervisor mode in the host, by running the
0112           guest in user mode (problem state) and emulating all
0113           privileged instructions and registers.
0114 
0115           This is only available for hash MMU mode and only supports
0116           guests that use hash MMU mode.
0117 
0118           This is not as fast as using hypervisor mode, but works on
0119           machines where hypervisor mode is not available or not usable,
0120           and can emulate processors that are different from the host
0121           processor, including emulating 32-bit processors on a 64-bit
0122           host.
0123 
0124           Selecting this option will cause the SCV facility to be
0125           disabled when the kernel is booted on the pseries platform in
0126           hash MMU mode (regardless of PR VMs running). When any PR VMs
0127           are running, "AIL" mode is disabled which may slow interrupts
0128           and system calls on the host.
0129 
0130 config KVM_BOOK3S_HV_EXIT_TIMING
0131         bool
0132 
0133 config KVM_BOOK3S_HV_P9_TIMING
0134         bool "Detailed timing for the P9 entry point"
0135         select KVM_BOOK3S_HV_EXIT_TIMING
0136         depends on KVM_BOOK3S_HV_POSSIBLE && DEBUG_FS
0137         help
0138           Calculate time taken for each vcpu during vcpu entry and
0139           exit, time spent inside the guest and time spent handling
0140           hypercalls and page faults. The total, minimum and maximum
0141           times in nanoseconds together with the number of executions
0142           are reported in debugfs in kvm/vm#/vcpu#/timings.
0143 
0144           If unsure, say N.
0145 
0146 config KVM_BOOK3S_HV_P8_TIMING
0147         bool "Detailed timing for hypervisor real-mode code (for POWER8)"
0148         select KVM_BOOK3S_HV_EXIT_TIMING
0149         depends on KVM_BOOK3S_HV_POSSIBLE && DEBUG_FS && !KVM_BOOK3S_HV_P9_TIMING
0150         help
0151           Calculate time taken for each vcpu in the real-mode guest entry,
0152           exit, and interrupt handling code, plus time spent in the guest
0153           and in nap mode due to idle (cede) while other threads are still
0154           in the guest.  The total, minimum and maximum times in nanoseconds
0155           together with the number of executions are reported in debugfs in
0156           kvm/vm#/vcpu#/timings.  The overhead is of the order of 30 - 40
0157           ns per exit on POWER8.
0158 
0159           If unsure, say N.
0160 
0161 config KVM_BOOK3S_HV_NESTED_PMU_WORKAROUND
0162         bool "Nested L0 host workaround for L1 KVM host PMU handling bug" if EXPERT
0163         depends on KVM_BOOK3S_HV_POSSIBLE
0164         default !EXPERT
0165         help
0166           Old nested HV capable Linux guests have a bug where they don't
0167           reflect the PMU in-use status of their L2 guest to the L0 host
0168           while the L2 PMU registers are live. This can result in loss
0169           of L2 PMU register state, causing perf to not work correctly in
0170           L2 guests.
0171 
0172           Selecting this option for the L0 host implements a workaround for
0173           those buggy L1s which saves the L2 state, at the cost of performance
0174           in all nested-capable guest entry/exit.
0175 
0176 config KVM_BOOKE_HV
0177         bool
0178 
0179 config KVM_EXIT_TIMING
0180         bool "Detailed exit timing"
0181         depends on KVM_E500V2 || KVM_E500MC
0182         help
0183           Calculate elapsed time for every exit/enter cycle. A per-vcpu
0184           report is available in debugfs kvm/vm#_vcpu#_timing.
0185           The overhead is relatively small, however it is not recommended for
0186           production environments.
0187 
0188           If unsure, say N.
0189 
0190 config KVM_E500V2
0191         bool "KVM support for PowerPC E500v2 processors"
0192         depends on E500 && !PPC_E500MC
0193         select KVM
0194         select KVM_MMIO
0195         select MMU_NOTIFIER
0196         help
0197           Support running unmodified E500 guest kernels in virtual machines on
0198           E500v2 host processors.
0199 
0200           This module provides access to the hardware capabilities through
0201           a character device node named /dev/kvm.
0202 
0203           If unsure, say N.
0204 
0205 config KVM_E500MC
0206         bool "KVM support for PowerPC E500MC/E5500/E6500 processors"
0207         depends on PPC_E500MC
0208         select KVM
0209         select KVM_MMIO
0210         select KVM_BOOKE_HV
0211         select MMU_NOTIFIER
0212         help
0213           Support running unmodified E500MC/E5500/E6500 guest kernels in
0214           virtual machines on E500MC/E5500/E6500 host processors.
0215 
0216           This module provides access to the hardware capabilities through
0217           a character device node named /dev/kvm.
0218 
0219           If unsure, say N.
0220 
0221 config KVM_MPIC
0222         bool "KVM in-kernel MPIC emulation"
0223         depends on KVM && E500
0224         select HAVE_KVM_IRQCHIP
0225         select HAVE_KVM_IRQFD
0226         select HAVE_KVM_IRQ_ROUTING
0227         select HAVE_KVM_MSI
0228         help
0229           Enable support for emulating MPIC devices inside the
0230           host kernel, rather than relying on userspace to emulate.
0231           Currently, support is limited to certain versions of
0232           Freescale's MPIC implementation.
0233 
0234 config KVM_XICS
0235         bool "KVM in-kernel XICS emulation"
0236         depends on KVM_BOOK3S_64 && !KVM_MPIC
0237         select HAVE_KVM_IRQCHIP
0238         select HAVE_KVM_IRQFD
0239         default y
0240         help
0241           Include support for the XICS (eXternal Interrupt Controller
0242           Specification) interrupt controller architecture used on
0243           IBM POWER (pSeries) servers.
0244 
0245 config KVM_XIVE
0246         bool
0247         default y
0248         depends on KVM_XICS && PPC_XIVE_NATIVE && KVM_BOOK3S_HV_POSSIBLE
0249 
0250 endif # VIRTUALIZATION