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

Re: [libvirt] [PATCH 13/14] Retain PCI address from NIC attach



On Mon, Jul 20, 2009 at 12:51:23PM +0100, Mark McLoughlin wrote:
> When we pci_add a NIC, we need to retain the PCI address assigned by
> qemu for using during detach.
> 
> * src/qemu_driver.c: use qemudParsePciAddReply() to pull the PCI
>   address from the pci_add reply
> 
> * src/domain_conf.c: handle storing and parsing the PCI address in the
>   domain state XML file

> @@ -3624,6 +3629,8 @@ virDomainNetDefFormat(virConnectPtr conn,
>              virBufferEscapeString(buf, " nic='%s'", def->nic_name);
>          if (def->hostnet_name)
>              virBufferEscapeString(buf, " hostnet='%s'", def->hostnet_name);
> +        if (def->pci_addr)
> +            virBufferEscapeString(buf, " devaddr='%s'", def->pci_addr);
>          if (def->vlan > 0)
>              virBufferVSprintf(buf, " vlan='%d'", def->vlan);
>          virBufferAddLit(buf, "/>\n");

  idem, only output this when doing the internal save, carried as an
  extra arg to the function.

Daniel

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


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