[libvirt] [PATCH] qemu: Do not free the device from activePciHostdevs if it's in use

Osier Yang jyang at redhat.com
Wed Oct 19 13:33:10 UTC 2011


于 2011年10月19日 20:30, Osier Yang 写道:
> * src/qemu/qemu_hostdev.c (qemuDomainReAttachHostdevDevices):
> pciDeviceListFree(pcidevs) at the end free()s the device even if
> it's in use by other domain, this is complete wrong, and will
> cause race. E.g.
>
> # sh test1.sh
> Device pci_0000_00_19_0 dettached
>
> Domain test started
>
> Device attached successfully
>
> error: Failed to start domain test2
> error: Requested operation is not valid: PCI device 0000:00:19.0 is in use by domain test
>
> [ -- 1th time --]
> Device pci_0000_00_19_0 re-attached
>
> [ -- 2th time --]
> Device pci_0000_00_19_0 re-attached
>
> [ -- 3th time --]
> Device pci_0000_00_19_0 re-attached
>
> [ -- 4th time --]
> Device pci_0000_00_19_0 re-attached
>
> [ -- 5th time --]
> Device pci_0000_00_19_0 re-attached
>
> clean up
> Domain test destroyed
>
> Device pci_0000_00_19_0 re-attached
>

Never mind the following duplicate texts. Will remove when pushing.

Osier




More information about the libvir-list mailing list