From 1c41ce6f30b6d5282af77736ad4cfb5a5228d126 Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Wed, 6 May 2009 15:51:47 +0000 Subject: [PATCH] * Wed May 6 2009 Mark McLoughlin - 0.6.2-5.fc11 - Fix handling of (bug #499386) --- libvirt-0.6.3-hostdev-managed.patch | 45 +++++++++++++++++++++++++++++ libvirt.spec | 8 ++++- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 libvirt-0.6.3-hostdev-managed.patch diff --git a/libvirt-0.6.3-hostdev-managed.patch b/libvirt-0.6.3-hostdev-managed.patch new file mode 100644 index 0000000..4d62aaa --- /dev/null +++ b/libvirt-0.6.3-hostdev-managed.patch @@ -0,0 +1,45 @@ +From 3d7771e0570e09096ad9391a857dad48b150bc0c Mon Sep 17 00:00:00 2001 +From: Mark McLoughlin +Date: Wed, 6 May 2009 16:33:28 +0100 +Subject: [PATCH] Fix qemu driver's interpretation of + +This change: + + Tue Mar 3 08:55:13 GMT 2009 Daniel P. Berrange + + 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 +--- + 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 + diff --git a/libvirt.spec b/libvirt.spec index 2b9482c..91b3d16 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -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 +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 OSes). %patch0 -p1 %patch1 -p1 +%patch2 -p1 %patch200 -p0 @@ -554,6 +557,9 @@ fi %endif %changelog +* Wed May 6 2009 Mark McLoughlin - 0.6.2-5.fc11 +- Fix handling of (bug #499386) + * Tue May 5 2009 Daniel P. Berrange - 0.6.2-4.fc11 - Fix labelling of shared/readonly disks (rhbz #493692)