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

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

 



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