[pve-devel] [PATCH 5/7] add kvm_pv_unhalt cpu flag

Alexandre Derumier aderumier at odiso.com
Mon Mar 16 05:57:45 CET 2015


require pvticketlocks from kernel 3.12 (backported in redhat 3.10 kernel)

see:
http://lwn.net/Articles/493402/

Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/QemuServer.pm |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index a4ea225..329b283 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2909,6 +2909,11 @@ sub config_to_command {
 
     push @$cpuFlags, '+sep' if $cpu eq 'kvm64' || $cpu eq 'kvm32';
 
+    if (qemu_machine_feature_enabled ($machine_type, $kvmver, 2, 3)) {
+
+	push @$cpuFlags , '+kvm_pv_unhalt' if !$nokvm;
+    }
+
     $cpu .= "," . join(',', @$cpuFlags) if scalar(@$cpuFlags);
 
     # Note: enforce needs kernel 3.10, so we do not use it for now
-- 
1.7.10.4




More information about the pve-devel mailing list