
On 01/14/2011 12:23 PM, Daniel P. Berrange wrote:
Alon's docs are showing the simplified syntax suitable for end users. This doesn't guarentee a stable guest visible ABI. Looking at the code, we need to set the 'slot' parameter on each ccid device we have. This means we need a new address type for smart card devices, and a corresponding <controller> instance.
Thanks - that clears up a lot for me. However, I still have a question:
So in the XML we'd get (including libvirt generated aliases and addresses):
<devices> <controller type='ccid' index='0'> <alias id='ccid0'/> </controller>
Are you suggesting that the XML mandate that the user provides a <controller type=ccid'>, or should I still shoot for the idea that if the user omits <controller> but provides <smartcard> that we go ahead and auto-create a controller (assigning it to the next available slot in the process)?
<smartcard mode='host'> <alias id='smartcard0'/> <address type='ccid' controller='0' slot='0'/>
So I _do_ need an (optional) <address> subelement for <smartcard> after all. Will go back and get that into my series.
In other words a hierarchy
USB bus 0 | +- ccid0 | | | +- smartcard0 (ccid slot 0) | +- smartcard1 (ccid slot 3) | +- ccid1 | +- smartcard2 (ccid slot 0)
Very helpful. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org