From 8f3f959d464ee4608a4c90c4d8cf7a7900d68ad9 Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Mon, 16 Mar 2015 05:57:42 +0100 Subject: [PATCH] hv_spinlocks : use 0x1fff instead 0xffff redhat use 0x1fff (8191) vs 0xffff (65535) This is the number of retries of spinlocks Signed-off-by: Alexandre Derumier --- PVE/QemuServer.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index db8572ba..6f0586b0 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -2866,7 +2866,11 @@ sub config_to_command { 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 (qemu_machine_feature_enabled ($machine_type, $kvmver, 2, 3)) { + push @$cpuFlags , 'hv_spinlocks=0x1fff' if !$nokvm; + } else { + push @$cpuFlags , 'hv_spinlocks=0xffff' if !$nokvm; + } } if ($ost eq 'win7' || $ost eq 'win8') {