Re: [PATCH 2/3] qemu: Release PCI slot when detaching disk and net devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 13, 2010 at 05:26:46PM +0200, Jiri Denemark wrote:
> ---
>  src/qemu/qemu_driver.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 2ca3940..108f67b 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -8649,6 +8649,10 @@ static int qemudDomainDetachPciDiskDevice(struct qemud_driver *driver,
>      }
>      qemuDomainObjExitMonitorWithDriver(driver, vm);
>  
> +    if ((qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE) &&
> +        qemuDomainPCIAddressReleaseAddr(priv->pciaddrs, &detach->info) < 0)
> +        VIR_WARN("Unable to release PCI address on %s", dev->data.disk->src);
> +
>      qemudShrinkDisks(vm->def, i);
>  
>      virDomainDiskDefFree(detach);
> @@ -8890,6 +8894,10 @@ qemudDomainDetachNetDevice(struct qemud_driver *driver,
>      }
>      qemuDomainObjExitMonitorWithDriver(driver, vm);
>  
> +    if ((qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE) &&
> +        qemuDomainPCIAddressReleaseAddr(priv->pciaddrs, &detach->info) < 0)
> +        VIR_WARN0("Unable to release PCI address on NIC");
> +
>      virDomainConfNWFilterTeardown(detach);
>  
>  #if WITH_MACVTAP

ACK

Daniel
-- 
|: Red Hat, Engineering, London    -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org        -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]