Re: [libvirt] [PATCH 02/14] Retain disk PCI address across libvirtd restarts

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

 



On Mon, Jul 20, 2009 at 12:51:12PM +0100, Mark McLoughlin wrote:
> When we hot-plug a disk device into a qemu guest, we need to retain its
> PCI address so that it can be removed again later. Currently, we do
> retain the slot number, but not across libvirtd restarts.
> 
> Add <state devaddr="xxxx:xx:xx"/> to the disk device XML config when the
> VIR_DOMAIN_XML_INTERNAL_STATUS flag is used. We still don't parse the
> domain and bus number, but the format allows us to do that in future.
> 
> * src/domain_conf.h: replace slotnum with pci_addr
> 
> * src/domain_conf.c: handle formatting and parsing the address
> 
> * src/qemu_driver.c: store the parsed slot number as a full PCI address,
>   and use this address with the pci_del monitor command
> 
> * src/vbox/vbox_tmpl.c: we're debug printing slotnum here even though
>   it can never be set, just delete it

  Looks okay to me except for the flags & VIR_DOMAIN_XML_INTERNAL_STATUS
mechanims to pass the extra operation semantic, either the define is
made private and we carry on with the same signature (but we need to
make sure no clash happen long term), or we add an extra parameter
passed down in the parsing functions (the later is a bit more brutal but
we don't need to check in the future),

  One thing w.r.t. replacing the slot number by the PCI address string
is that we could split that address fully and keep the slot number as
one of the values. More checking, code a bit more complex too...

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]