[fedora-virt-maint] rpms/libvirt/F-11 libvirt-0.6.3-hostdev-managed.patch, NONE, 1.1 libvirt.spec, 1.126, 1.127

Mark McLoughlin markmc at fedoraproject.org
Wed May 6 15:52:17 UTC 2009


Author: markmc

Update of /cvs/pkgs/rpms/libvirt/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv3157

Modified Files:
	libvirt.spec 
Added Files:
	libvirt-0.6.3-hostdev-managed.patch 
Log Message:
* Wed May  6 2009 Mark McLoughlin <markmc at redhat.com> - 0.6.2-5.fc11
- Fix handling of <hostdev managed='yes'> (bug #499386)


libvirt-0.6.3-hostdev-managed.patch:

--- NEW FILE libvirt-0.6.3-hostdev-managed.patch ---
>From 3d7771e0570e09096ad9391a857dad48b150bc0c Mon Sep 17 00:00:00 2001
From: Mark McLoughlin <markmc at redhat.com>
Date: Wed, 6 May 2009 16:33:28 +0100
Subject: [PATCH] Fix qemu driver's interpretation of <hostdev managed='yes'/>

This change:

  Tue Mar  3 08:55:13 GMT 2009 Daniel P. Berrange <berrange at redhat.com>

       Don't try to detach & reset PCI devices while running test
       suite for XML-> ARGV conversion.
       * src/qemu_driver.c: Add qemuPrepareHostDevices() helper to
       detach and reset PCI devices.
       * src/qemu_conf.c: Don't detach & reset PCI devices while
       building the command line argv

accidentally did this:

-            if (hostdev->managed) {
+        if (!hostdev->managed) {

Which results in managed='yes' not causing the device to be
detached when the guest is starting.

Signed-off-by: Mark McLoughlin <markmc at redhat.com>
---
 src/qemu_driver.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/qemu_driver.c b/src/qemu_driver.c
index 5898026..59312c0 100644
--- a/src/qemu_driver.c
+++ b/src/qemu_driver.c
@@ -1215,7 +1215,7 @@ static int qemuPrepareHostDevices(virConnectPtr conn,
         if (hostdev->source.subsys.type != VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI)
             continue;
 
-        if (!hostdev->managed) {
+        if (hostdev->managed) {
             pciDevice *dev = pciGetDevice(conn,
                                           hostdev->source.subsys.u.pci.domain,
                                           hostdev->source.subsys.u.pci.bus,
-- 
1.6.0.6



Index: libvirt.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libvirt/F-11/libvirt.spec,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -p -r1.126 -r1.127
--- libvirt.spec	5 May 2009 13:01:15 -0000	1.126
+++ libvirt.spec	6 May 2009 15:51:47 -0000	1.127
@@ -66,7 +66,7 @@
 Summary: Library providing a simple API virtualization
 Name: libvirt
 Version: 0.6.2
-Release: 4%{?dist}%{?extra_release}
+Release: 5%{?dist}%{?extra_release}
 License: LGPLv2+
 Group: Development/Libraries
 Source: libvirt-%{version}.tar.gz
@@ -75,6 +75,8 @@ Source: libvirt-%{version}.tar.gz
 Patch0: libvirt-0.6.2-qemu-drive-format.patch
 # Fix shared/readonly disk labelling
 Patch1: libvirt-0.6.2-shared-readonly-label.patch
+# Fix <hostdev managed='yes'>
+Patch2: libvirt-0.6.3-hostdev-managed.patch
 
 # Not for upstream. Temporary hack till PulseAudio autostart
 # problems are sorted out when SELinux enforcing
@@ -231,6 +233,7 @@ of recent versions of Linux (and other O
 
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %patch200 -p0
 
@@ -554,6 +557,9 @@ fi
 %endif
 
 %changelog
+* Wed May  6 2009 Mark McLoughlin <markmc at redhat.com> - 0.6.2-5.fc11
+- Fix handling of <hostdev managed='yes'> (bug #499386)
+
 * Tue May  5 2009 Daniel P. Berrange <berrange at redhat.com> - 0.6.2-4.fc11
 - Fix labelling of shared/readonly disks (rhbz #493692)
 




More information about the Fedora-virt-maint mailing list