mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-06-28 19:15:57 +00:00
disable hyper-v enlightment when xvga is enabled
Geforce drivers (> 344.11) crash with code43 error if they detect hyper-v enlighment with pci passtthrough http://awilliam.github.io/presentations/KVM-Forum-2014/#/5/3 Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
parent
9e0a6c9f5e
commit
2315b39c8a
@ -2758,6 +2758,7 @@ sub config_to_command {
|
||||
|
||||
push @$devices, '-device', print_tabletdevice_full($conf) if $tablet;
|
||||
|
||||
my $nohyperv;
|
||||
# host pci devices
|
||||
for (my $i = 0; $i < $MAX_HOSTPCI_DEVICES; $i++) {
|
||||
my $d = parse_hostpci($conf->{"hostpci$i"});
|
||||
@ -2776,6 +2777,7 @@ sub config_to_command {
|
||||
if ($xvga && $xvga ne '') {
|
||||
push @$cpuFlags, 'kvm=off';
|
||||
$vga = 'none';
|
||||
$nohyperv = 1;
|
||||
}
|
||||
my $pcidevices = $d->{pciid};
|
||||
my $multifunction = 1 if @$pcidevices > 1;
|
||||
@ -2902,17 +2904,17 @@ sub config_to_command {
|
||||
push @$globalFlags, 'kvm-pit.lost_tick_policy=discard';
|
||||
push @$cmd, '-no-hpet';
|
||||
if (qemu_machine_feature_enabled ($machine_type, $kvmver, 2, 3)) {
|
||||
push @$cpuFlags , 'hv_spinlocks=0x1fff' if !$nokvm;
|
||||
push @$cpuFlags , 'hv_vapic' if !$nokvm;
|
||||
push @$cpuFlags , 'hv_time' if !$nokvm;
|
||||
push @$cpuFlags , 'hv_spinlocks=0x1fff' if !$nokvm && !$nohyperv;
|
||||
push @$cpuFlags , 'hv_vapic' if !$nokvm && !$nohyperv;
|
||||
push @$cpuFlags , 'hv_time' if !$nokvm && !$nohyperv;
|
||||
|
||||
} else {
|
||||
push @$cpuFlags , 'hv_spinlocks=0xffff' if !$nokvm;
|
||||
push @$cpuFlags , 'hv_spinlocks=0xffff' if !$nokvm && !$nohyperv;
|
||||
}
|
||||
}
|
||||
|
||||
if ($ost eq 'win7' || $ost eq 'win8') {
|
||||
push @$cpuFlags , 'hv_relaxed' if !$nokvm;
|
||||
push @$cpuFlags , 'hv_relaxed' if !$nokvm && !$nohyperv;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user