From 1d6c713b18741f1a0e3d0ccd094275a11aef138c Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Wed, 6 May 2009 15:56:20 +0000 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 --- ChangeLog | 4 ++++ src/qemu_driver.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2ab74af998..68865df352 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Wed May 6 16:55:02 GMT 2009 Mark McLoughlin + + * src/qemu_driver.c: fix handling of + Wed May 6 10:19:36 EDT 2009 Cole Robinson * src/qemu_driver.c : Refresh QEMU driver capabilities for each diff --git a/src/qemu_driver.c b/src/qemu_driver.c index 589802613c..59312c022e 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,