]> git.proxmox.com Git - qemu-server.git/commitdiff
hv_spinlocks : use 0x1fff instead 0xffff
authorAlexandre Derumier <aderumier@odiso.com>
Mon, 16 Mar 2015 04:57:42 +0000 (05:57 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 17 Mar 2015 07:56:36 +0000 (08:56 +0100)
redhat use 0x1fff (8191)  vs 0xffff (65535)
This is the number of retries of spinlocks

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
PVE/QemuServer.pm

index db8572baa1fa2dde375bacaaf776fc759d1a0669..6f0586b0d3b9812cc37de57651afb0065ad1d3c0 100644 (file)
@@ -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') {