[pve-devel] [PATCH] disable hyper-v enlightment when xvga is enabled
Alexandre Derumier
aderumier at odiso.com
Sun Jan 3 19:05:31 CET 2016
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 at odiso.com>
---
PVE/QemuServer.pm | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 13e9609..7991f10 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -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;
}
}
--
2.1.4
More information about the pve-devel
mailing list