1*7f7c8d0cSVitaly KuznetsovParavirtualized KVM features 2*7f7c8d0cSVitaly Kuznetsov============================ 3*7f7c8d0cSVitaly Kuznetsov 4*7f7c8d0cSVitaly KuznetsovDescription 5*7f7c8d0cSVitaly Kuznetsov----------- 6*7f7c8d0cSVitaly Kuznetsov 7*7f7c8d0cSVitaly KuznetsovIn some cases when implementing hardware interfaces in software is slow, ``KVM`` 8*7f7c8d0cSVitaly Kuznetsovimplements its own paravirtualized interfaces. 9*7f7c8d0cSVitaly Kuznetsov 10*7f7c8d0cSVitaly KuznetsovSetup 11*7f7c8d0cSVitaly Kuznetsov----- 12*7f7c8d0cSVitaly Kuznetsov 13*7f7c8d0cSVitaly KuznetsovParavirtualized ``KVM`` features are represented as CPU flags. The following 14*7f7c8d0cSVitaly Kuznetsovfeatures are enabled by default for any CPU model when ``KVM`` acceleration is 15*7f7c8d0cSVitaly Kuznetsovenabled: 16*7f7c8d0cSVitaly Kuznetsov 17*7f7c8d0cSVitaly Kuznetsov- ``kvmclock`` 18*7f7c8d0cSVitaly Kuznetsov- ``kvm-nopiodelay`` 19*7f7c8d0cSVitaly Kuznetsov- ``kvm-asyncpf`` 20*7f7c8d0cSVitaly Kuznetsov- ``kvm-steal-time`` 21*7f7c8d0cSVitaly Kuznetsov- ``kvm-pv-eoi`` 22*7f7c8d0cSVitaly Kuznetsov- ``kvmclock-stable-bit`` 23*7f7c8d0cSVitaly Kuznetsov 24*7f7c8d0cSVitaly Kuznetsov``kvm-msi-ext-dest-id`` feature is enabled by default in x2apic mode with split 25*7f7c8d0cSVitaly Kuznetsovirqchip (e.g. "-machine ...,kernel-irqchip=split -cpu ...,x2apic"). 26*7f7c8d0cSVitaly Kuznetsov 27*7f7c8d0cSVitaly KuznetsovNote: when CPU model ``host`` is used, QEMU passes through all supported 28*7f7c8d0cSVitaly Kuznetsovparavirtualized ``KVM`` features to the guest. 29*7f7c8d0cSVitaly Kuznetsov 30*7f7c8d0cSVitaly KuznetsovExisting features 31*7f7c8d0cSVitaly Kuznetsov----------------- 32*7f7c8d0cSVitaly Kuznetsov 33*7f7c8d0cSVitaly Kuznetsov``kvmclock`` 34*7f7c8d0cSVitaly Kuznetsov Expose a ``KVM`` specific paravirtualized clocksource to the guest. Supported 35*7f7c8d0cSVitaly Kuznetsov since Linux v2.6.26. 36*7f7c8d0cSVitaly Kuznetsov 37*7f7c8d0cSVitaly Kuznetsov``kvm-nopiodelay`` 38*7f7c8d0cSVitaly Kuznetsov The guest doesn't need to perform delays on PIO operations. Supported since 39*7f7c8d0cSVitaly Kuznetsov Linux v2.6.26. 40*7f7c8d0cSVitaly Kuznetsov 41*7f7c8d0cSVitaly Kuznetsov``kvm-mmu`` 42*7f7c8d0cSVitaly Kuznetsov This feature is deprecated. 43*7f7c8d0cSVitaly Kuznetsov 44*7f7c8d0cSVitaly Kuznetsov``kvm-asyncpf`` 45*7f7c8d0cSVitaly Kuznetsov Enable asynchronous page fault mechanism. Supported since Linux v2.6.38. 46*7f7c8d0cSVitaly Kuznetsov Note: since Linux v5.10 the feature is deprecated and not enabled by ``KVM``. 47*7f7c8d0cSVitaly Kuznetsov Use ``kvm-asyncpf-int`` instead. 48*7f7c8d0cSVitaly Kuznetsov 49*7f7c8d0cSVitaly Kuznetsov``kvm-steal-time`` 50*7f7c8d0cSVitaly Kuznetsov Enable stolen (when guest vCPU is not running) time accounting. Supported 51*7f7c8d0cSVitaly Kuznetsov since Linux v3.1. 52*7f7c8d0cSVitaly Kuznetsov 53*7f7c8d0cSVitaly Kuznetsov``kvm-pv-eoi`` 54*7f7c8d0cSVitaly Kuznetsov Enable paravirtualized end-of-interrupt signaling. Supported since Linux 55*7f7c8d0cSVitaly Kuznetsov v3.10. 56*7f7c8d0cSVitaly Kuznetsov 57*7f7c8d0cSVitaly Kuznetsov``kvm-pv-unhalt`` 58*7f7c8d0cSVitaly Kuznetsov Enable paravirtualized spinlocks support. Supported since Linux v3.12. 59*7f7c8d0cSVitaly Kuznetsov 60*7f7c8d0cSVitaly Kuznetsov``kvm-pv-tlb-flush`` 61*7f7c8d0cSVitaly Kuznetsov Enable paravirtualized TLB flush mechanism. Supported since Linux v4.16. 62*7f7c8d0cSVitaly Kuznetsov 63*7f7c8d0cSVitaly Kuznetsov``kvm-pv-ipi`` 64*7f7c8d0cSVitaly Kuznetsov Enable paravirtualized IPI mechanism. Supported since Linux v4.19. 65*7f7c8d0cSVitaly Kuznetsov 66*7f7c8d0cSVitaly Kuznetsov``kvm-poll-control`` 67*7f7c8d0cSVitaly Kuznetsov Enable host-side polling on HLT control from the guest. Supported since Linux 68*7f7c8d0cSVitaly Kuznetsov v5.10. 69*7f7c8d0cSVitaly Kuznetsov 70*7f7c8d0cSVitaly Kuznetsov``kvm-pv-sched-yield`` 71*7f7c8d0cSVitaly Kuznetsov Enable paravirtualized sched yield feature. Supported since Linux v5.10. 72*7f7c8d0cSVitaly Kuznetsov 73*7f7c8d0cSVitaly Kuznetsov``kvm-asyncpf-int`` 74*7f7c8d0cSVitaly Kuznetsov Enable interrupt based asynchronous page fault mechanism. Supported since Linux 75*7f7c8d0cSVitaly Kuznetsov v5.10. 76*7f7c8d0cSVitaly Kuznetsov 77*7f7c8d0cSVitaly Kuznetsov``kvm-msi-ext-dest-id`` 78*7f7c8d0cSVitaly Kuznetsov Support 'Extended Destination ID' for external interrupts. The feature allows 79*7f7c8d0cSVitaly Kuznetsov to use up to 32768 CPUs without IRQ remapping (but other limits may apply making 80*7f7c8d0cSVitaly Kuznetsov the number of supported vCPUs for a given configuration lower). Supported since 81*7f7c8d0cSVitaly Kuznetsov Linux v5.10. 82*7f7c8d0cSVitaly Kuznetsov 83*7f7c8d0cSVitaly Kuznetsov``kvmclock-stable-bit`` 84*7f7c8d0cSVitaly Kuznetsov Tell the guest that guest visible TSC value can be fully trusted for kvmclock 85*7f7c8d0cSVitaly Kuznetsov computations and no warps are expected. Supported since Linux v2.6.35. 86*7f7c8d0cSVitaly Kuznetsov 87*7f7c8d0cSVitaly KuznetsovSupplementary features 88*7f7c8d0cSVitaly Kuznetsov---------------------- 89*7f7c8d0cSVitaly Kuznetsov 90*7f7c8d0cSVitaly Kuznetsov``kvm-pv-enforce-cpuid`` 91*7f7c8d0cSVitaly Kuznetsov Limit the supported paravirtualized feature set to the exposed features only. 92*7f7c8d0cSVitaly Kuznetsov Note, by default, ``KVM`` allows the guest to use all currently supported 93*7f7c8d0cSVitaly Kuznetsov paravirtualized features even when they were not announced in guest visible 94*7f7c8d0cSVitaly Kuznetsov CPUIDs. Supported since Linux v5.10. 95*7f7c8d0cSVitaly Kuznetsov 96*7f7c8d0cSVitaly Kuznetsov 97*7f7c8d0cSVitaly KuznetsovUseful links 98*7f7c8d0cSVitaly Kuznetsov------------ 99*7f7c8d0cSVitaly Kuznetsov 100*7f7c8d0cSVitaly KuznetsovPlease refer to Documentation/virt/kvm in Linux for additional details. 101