On Fri, 2009-12-18 at 13:59 +0000, Daniel P. Berrange wrote:
> The plan we had to future proof this was that libvirt would
assign an id
> (using -device foo,id=bar) and 'info pci' would include the device id in
> its output.
>
> Once you have that, you no longer need to make assumptions about what
> product:vendor is used for each device or what order addresses are
> allocated. It's a simple addition to qemu and a simple addition to your
> 'info pci' parsing code, but I think we'd rest easier wrt. future
> compatibility.
That would be preferable, but the trouble is that will only work with
QEMU >= 0.12. Using the 'info pci' output works for all QEMUs. By
'works'
I mean it lets us handle unplug even of devices present at startup. It
obviously doesn't allow for static PCI addresing, since that requires
the new -device arg.
Yep, I didn't mean to suggest that you shouldn't go ahead with your
approach.
Just that if qemu had the id listed in 'info pci', libvirt could use
that with versions of qemu that supply it and we'd then be less exposed
to future changes.
Cheers,
Mark.