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

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

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