[pve-devel] r5644 - qemu-server/trunk

svn-commits at proxmox.com svn-commits at proxmox.com
Fri Mar 4 08:07:21 CET 2011


Author: dietmar
Date: 2011-03-04 08:07:21 +0100 (Fri, 04 Mar 2011)
New Revision: 5644

Modified:
   qemu-server/trunk/ChangeLog
   qemu-server/trunk/Makefile
   qemu-server/trunk/QemuServer.pm
   qemu-server/trunk/changelog.Debian
Log:


Modified: qemu-server/trunk/ChangeLog
===================================================================
--- qemu-server/trunk/ChangeLog	2011-03-03 13:36:35 UTC (rev 5643)
+++ qemu-server/trunk/ChangeLog	2011-03-04 07:07:21 UTC (rev 5644)
@@ -1,3 +1,8 @@
+2011-03-04  Proxmox Support Team  <support at proxmox.com>
+
+	* QemuServer.pm (config_to_command): use new "-device
+	pci-assign,.." syntax for pci assignment
+
 2010-12-09  Proxmox Support Team  <support at proxmox.com>
 
 	* QemuServer.pm (config_to_command): fix bug in network device naming

Modified: qemu-server/trunk/Makefile
===================================================================
--- qemu-server/trunk/Makefile	2011-03-03 13:36:35 UTC (rev 5643)
+++ qemu-server/trunk/Makefile	2011-03-04 07:07:21 UTC (rev 5644)
@@ -2,7 +2,7 @@
 
 VERSION=1.1
 PACKAGE=qemu-server
-PKGREL=28
+PKGREL=29
 
 DESTDIR=
 PREFIX=/usr

Modified: qemu-server/trunk/QemuServer.pm
===================================================================
--- qemu-server/trunk/QemuServer.pm	2011-03-03 13:36:35 UTC (rev 5643)
+++ qemu-server/trunk/QemuServer.pm	2011-03-04 07:07:21 UTC (rev 5644)
@@ -1234,6 +1234,12 @@
     my $cmd = [];
 
     my $kvmver = kvm_user_version();
+    my $vernum = 0; # unknown
+    if ($kvmver =~ m/^(\d+)\.(\d+)\.(\d+)$/) {
+	$vernum = $1*1000000+$2*1000+$3;
+    } else {
+	die "unable to parse kvm version '$kvmver'\n";
+    }
 
     my $have_ovz = -f '/proc/vz/vestat';
 
@@ -1261,7 +1267,12 @@
     if (my $pcidl = $conf->{hostpci}) {
 	my @dl = split (/,/, $pcidl);
 	foreach my $dev (@dl) {
-	    push @$cmd, '-pcidevice', "host=$dev" if $dev;
+	    next if !$dev;
+	    if ($vernum < 13000) {
+		push @$cmd, '-pcidevice', "host=$dev";
+	    } else {
+		push @$cmd, '-device', "pci-assign,host=$dev";
+	    }
 	}
     }
     # host usb devices
@@ -1306,13 +1317,6 @@
 
     my $boot_opt;
 
-    my $vernum = 0; # unknown
-    if ($kvmver =~ m/^(\d+)\.(\d+)\.(\d+)$/) {
-	$vernum = $1*1000000+$2*1000+$3;
-    } else {
-	die "unable to parse kvm version '$kvmver'\n";
-    }
-
     if ($vernum < 11000) { # 0.9.X and 0.10.X
 
 	push @$cmd, '-smp', $sockets*$cores;

Modified: qemu-server/trunk/changelog.Debian
===================================================================
--- qemu-server/trunk/changelog.Debian	2011-03-03 13:36:35 UTC (rev 5643)
+++ qemu-server/trunk/changelog.Debian	2011-03-04 07:07:21 UTC (rev 5644)
@@ -1,3 +1,9 @@
+qemu-server (1.1-29) unstable; urgency=low
+
+  * fix pci device assignment for newer qemu
+
+ -- Proxmox Support Team <support at proxmox.com>  Fri, 04 Mar 2011 08:05:47 +0100
+
 qemu-server (1.1-28) unstable; urgency=low
 
   * fix bug in network device naming




More information about the pve-devel mailing list