* Wed May 6 2009 Mark McLoughlin <markmc@redhat.com> - 0.6.2-5.fc11

- Fix handling of <hostdev managed='yes'> (bug #499386)
This commit is contained in:
Mark McLoughlin 2009-05-06 15:51:47 +00:00
parent c6db79d97f
commit 1c41ce6f30
2 changed files with 52 additions and 1 deletions

View File

@ -0,0 +1,45 @@
From 3d7771e0570e09096ad9391a857dad48b150bc0c Mon Sep 17 00:00:00 2001
From: Mark McLoughlin <markmc@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@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@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

View File

@ -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 OSes).
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch200 -p0
@ -554,6 +557,9 @@ fi
%endif
%changelog
* Wed May 6 2009 Mark McLoughlin <markmc@redhat.com> - 0.6.2-5.fc11
- Fix handling of <hostdev managed='yes'> (bug #499386)
* Tue May 5 2009 Daniel P. Berrange <berrange@redhat.com> - 0.6.2-4.fc11
- Fix labelling of shared/readonly disks (rhbz #493692)