From 9040435417de9794f0fffb6b7501fd5bf1481efc Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Wed, 23 Jul 2014 14:38:00 +0200 Subject: [PATCH] disable kvm cpu signature if x-vga is enabled see http://git.qemu.org/?p=qemu.git;a=commit;h=f522d2acc549dd11f495048330aa5f3f424a7dfa last nvdia drivers don't install in kvm machine if they detect kvm signature. This patch hide kvm signature in cpuflags (but don't disable kvm) Signed-off-by: Alexandre Derumier --- PVE/QemuServer.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 252fb13f..86d38378 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -2468,7 +2468,7 @@ sub config_to_command { } push @$devices, '-device', print_tabletdevice_full($conf) if $tablet; - + # host pci devices for (my $i = 0; $i < $MAX_HOSTPCI_DEVICES; $i++) { my $d = parse_hostpci($conf->{"hostpci$i"}); @@ -2485,6 +2485,8 @@ sub config_to_command { my $rombar = $d->{rombar} && $d->{rombar} eq 'off' ? ",rombar=0" : ""; my $driver = $d->{driver} && $d->{driver} eq 'vfio' ? "vfio-pci" : "pci-assign"; my $xvga = $d->{'x-vga'} && $d->{'x-vga'} eq 'on' ? ",x-vga=on" : ""; + push @$cpuFlags, 'kvm=off' if $xvga && $xvga ne ''; + $driver = "vfio-pci" if $xvga ne ''; my $pcidevices = $d->{pciid}; my $multifunction = 1 if @$pcidevices > 1; -- 2.39.5