[pve-devel] [PATCH qemu-server] fix #2083: Add hv_tlbflush, hv_ipi, hv_evmcs enlightenments

Stefan Reiter s.reiter at proxmox.com
Tue Jun 18 14:20:00 CEST 2019


Kernels 4.18+ (4.17+ for evmcs) support new Hyper-V enlightenments for
Windows KVM guests. QEMU supports these since 3.0.
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
they don't cause any penalties, enabling them regardless should be fine.

Signed-off-by: Stefan Reiter <s.reiter at proxmox.com>
---
 PVE/QemuServer.pm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 341e0b0..88d07c2 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -7170,6 +7170,13 @@ sub add_hyperv_enlightenments {
 	    push @$cpuFlags , 'hv_synic';
 	    push @$cpuFlags , 'hv_stimer';
 	}
+
+	if (qemu_machine_feature_enabled ($machine_type, $kvmver, 3, 0))
+	{
+	    push @$cpuFlags , 'hv_tlbflush';
+	    push @$cpuFlags , 'hv_ipi';
+	    push @$cpuFlags , 'hv_evmcs';
+	}
     }
 }
 
-- 
2.20.1





More information about the pve-devel mailing list