render / rpms / libvirt

Forked from rpms/libvirt 11 months ago
Clone
Mark McLoughlin fa0f21
From 3d7771e0570e09096ad9391a857dad48b150bc0c Mon Sep 17 00:00:00 2001
Mark McLoughlin fa0f21
From: Mark McLoughlin <markmc@redhat.com>
Mark McLoughlin fa0f21
Date: Wed, 6 May 2009 16:33:28 +0100
Mark McLoughlin fa0f21
Subject: [PATCH] Fix qemu driver's interpretation of <hostdev managed='yes'/>
Mark McLoughlin fa0f21
Mark McLoughlin fa0f21
This change:
Mark McLoughlin fa0f21
Mark McLoughlin fa0f21
  Tue Mar  3 08:55:13 GMT 2009 Daniel P. Berrange <berrange@redhat.com>
Mark McLoughlin fa0f21
Mark McLoughlin fa0f21
       Don't try to detach & reset PCI devices while running test
Mark McLoughlin fa0f21
       suite for XML-> ARGV conversion.
Mark McLoughlin fa0f21
       * src/qemu_driver.c: Add qemuPrepareHostDevices() helper to
Mark McLoughlin fa0f21
       detach and reset PCI devices.
Mark McLoughlin fa0f21
       * src/qemu_conf.c: Don't detach & reset PCI devices while
Mark McLoughlin fa0f21
       building the command line argv
Mark McLoughlin fa0f21
Mark McLoughlin fa0f21
accidentally did this:
Mark McLoughlin fa0f21
Mark McLoughlin fa0f21
-            if (hostdev->managed) {
Mark McLoughlin fa0f21
+        if (!hostdev->managed) {
Mark McLoughlin fa0f21
Mark McLoughlin fa0f21
Which results in managed='yes' not causing the device to be
Mark McLoughlin fa0f21
detached when the guest is starting.
Mark McLoughlin fa0f21
Mark McLoughlin fa0f21
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Mark McLoughlin fa0f21
---
Mark McLoughlin fa0f21
 src/qemu_driver.c |    2 +-
Mark McLoughlin fa0f21
 1 files changed, 1 insertions(+), 1 deletions(-)
Mark McLoughlin fa0f21
Mark McLoughlin fa0f21
diff --git a/src/qemu_driver.c b/src/qemu_driver.c
Mark McLoughlin fa0f21
index 5898026..59312c0 100644
Mark McLoughlin fa0f21
--- a/src/qemu_driver.c
Mark McLoughlin fa0f21
+++ b/src/qemu_driver.c
Mark McLoughlin fa0f21
@@ -1215,7 +1215,7 @@ static int qemuPrepareHostDevices(virConnectPtr conn,
Mark McLoughlin fa0f21
         if (hostdev->source.subsys.type != VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI)
Mark McLoughlin fa0f21
             continue;
Mark McLoughlin fa0f21
 
Mark McLoughlin fa0f21
-        if (!hostdev->managed) {
Mark McLoughlin fa0f21
+        if (hostdev->managed) {
Mark McLoughlin fa0f21
             pciDevice *dev = pciGetDevice(conn,
Mark McLoughlin fa0f21
                                           hostdev->source.subsys.u.pci.domain,
Mark McLoughlin fa0f21
                                           hostdev->source.subsys.u.pci.bus,
Mark McLoughlin fa0f21
-- 
Mark McLoughlin fa0f21
1.6.0.6
Mark McLoughlin fa0f21