]> git.proxmox.com Git - qemu-server.git/commit
fix #2083: Add hv_tlbflush, hv_ipi, hv_evmcs enlightenments
authorStefan Reiter <s.reiter@proxmox.com>
Wed, 19 Jun 2019 08:23:20 +0000 (10:23 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 24 Jun 2019 15:22:35 +0000 (17:22 +0200)
commit392dfbf51e3f21cc539f96d02bcfd061393007e8
treeb44880e72d70283d58c1606354837af6b9e59a10
parent0eb21691361ccb9d30b10114016423e0d0defdd8
fix #2083: Add hv_tlbflush, hv_ipi, hv_evmcs enlightenments

Kernels 4.18+ (4.17+ for evmcs) support new Hyper-V enlightenments for
Windows KVM guests. QEMU supports these since 3.0 and 3.1 respectively.
tlbflush and ipi improve performance on overcommitted systems, evmcs
improves nested virtualization.

It's not entirely clear to me if Win7 already supports these, but since
it doesn't cause any performance penalties (and it works fine without
crashing, which makes sense either way, because Hyper-V enlightenments
are opt-in by the guest OS), enabling it regardless should be fine.
(As opposed to adding a new if branch for win8+)

Feature explanations to the best of my understanding:

hv_tlbflush allows the guest OS to trigger tlb shootdowns via a
hypercall. This allows CPUs to be identified via their vpindex (which
makes hv_vpindex a prerequisite to hv_tlbflush, but that is already
handled in our code). In overcommited configurations, where multiple
vCPUs reside on one pCPU, this increases performance of guest tlb
flushes, by only flushing each pCPU once. It also allows multiple tlb
flushes with only one vmexit.

hv_ipi allows sending inter-processor interrupts via vpindex, once again
making it a prerequisite. Benefits are pretty much as with tlbflush.

hv_evmcs is a VM control structure in L1 guest memory, allowing an L1 guest
to modify L2 VMCS and entering L2 without having the L0 host perform an
expensive VMCS update on trapping the nested vmenter.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
PVE/QemuServer.pm