Re: [libvirt] [PATCH 07/13] Assign PCI addresses before hotplugging devices

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

 



On Mon, Feb 01, 2010 at 06:39:36PM +0000, Daniel P. Berrange wrote:
> PCI disk, disk controllers, net devices and host devices need to
> have PCI addresses assigned before they are hot-plugged
> 
> * src/qemu/qemu_conf.c: Add APIs for ensuring a device has an
>   address and releasing unused addresses
> * src/qemu/qemu_driver.c: Ensure all devices have addresses
>   when hotplugging.
> ---
>  src/qemu/qemu_conf.c   |   60 ++++++++++++++++++++++++++++++++++++++---------
>  src/qemu/qemu_conf.h   |   11 +++++++-
>  src/qemu/qemu_driver.c |   43 ++++++++++++++++++++++++++++++++--
>  3 files changed, 97 insertions(+), 17 deletions(-)
[...]
>  cleanup:
> +    if ((ret != 0) &&
> +        (qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE) &&
> +        (net->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) &&
> +        qemuDomainPCIAddressReleaseAddr(priv->pciaddrs, &net->info) < 0)
> +        VIR_WARN0("Unable to release PCI address on NIC");
> +

  Wondering to which extend (qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE) check
  shouldn't be handled down in allocation and releasing routines instead
  of before each invocation, but it's minor.

ACK,

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
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]