[libvirt] [PATCH 3/3] reattach pci devices when qemuPrepareHostdevPCIDevices() failed
Eric Blake
eblake at redhat.com
Mon Apr 4 22:54:54 UTC 2011
On 03/28/2011 01:01 AM, Wen Congyang wrote:
> Reattach all pci devices that we detached when qemuPrepareHostdevPCIDevices()
> failed.
>
> ---
> src/qemu/qemu_hostdev.c | 12 +++++++++---
> 1 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c
> index 30db0e2..7f5ad51 100644
> --- a/src/qemu/qemu_hostdev.c
> +++ b/src/qemu/qemu_hostdev.c
> @@ -127,11 +127,11 @@ int qemuPrepareHostdevPCIDevices(struct qemud_driver *driver,
> for (i = 0; i < pciDeviceListCount(pcidevs); i++) {
> pciDevice *dev = pciDeviceListGet(pcidevs, i);
> if (!pciDeviceIsAssignable(dev, !driver->relaxedACS))
> - goto cleanup;
> + goto reattachdevs;
>
> if (pciDeviceGetManaged(dev) &&
> pciDettachDevice(dev, driver->activePciHostdevs) < 0)
> - goto cleanup;
> + goto reattachdevs;
Makes sense; ACK.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110404/be1c4c98/attachment-0001.sig>
More information about the libvir-list
mailing list