[pve-devel] [PATCH 3/3] add hyper-v enlightments for windows guests

Alexandre Derumier aderumier at odiso.com
Mon Jul 15 08:51:37 CEST 2013


This add special hyper-v cpu flags for windows guests.

This improve performance and avoid some bsod related to timer.

(I currently disable the hv_vapic flag because I can't get it working).

I have tested all theses flags with: win2003, win2008R2, winxp, linux debian 64bit, on intel and amd physicals processor

It doesn't break live migration, because new cpu flags are not see by guests until a vm reset.

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

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index ff5760f..62c74cc 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2371,6 +2371,12 @@ sub config_to_command {
 	    $ost eq 'wvista') {
 	    push @$globalFlags, 'kvm-pit.lost_tick_policy=discard';
 	    push @$cmd, '-no-hpet';
+	    #push @$cpuFlags , 'hv_vapic" if !$nokvm;  #fixme, my win2008R2 hang at boot with this
+	    push @$cpuFlags , 'hv_spinlocks=0xffff' if !$nokvm;
+	}
+
+	if ($ost eq 'win7' || $ost eq 'win8') {
+	    push @$cpuFlags , 'hv_relaxed' if !$nokvm;
 	}
     }
 
-- 
1.7.10.4




More information about the pve-devel mailing list