On Mon, 2010-01-11 at 15:16 +0800, Simon Horman wrote:
> > @@ -328,7 +332,7 @@
> > template['domain'] = "0x%04x" % domain
> > template['bus'] = "0x%02x" % int(pci_dev_info['bus'], 16)
> > template['slot'] = "0x%02x" % int(pci_dev_info['slot'], 16)
> > - template['key'] = pci_dev_str
> > + template['key'] = pci_dev_str.split(',')[0]
>
> Splitting on a comma won't work as desired here, as the function
> portion of multi-function devices may include comas.
>
> Leaving the key as pci_dev_str, is probably ok. Otherwise I suggest
> constructing the key from template['domain'], template['bus'],
> template['slot'], pci_dev_infom['func'] and conditionally
> pci_dev_infom['vdevfn'].
Thank you for commenting
In fact, changing the key here doesn't explictly impact the option part
I'm trying to fix, because ioemu doesn't seem to use backend when creating
devices. I just changed it for consistency since I found that options
were also attached in key using comma, but I failed to notice its
usage as a separator of multi-function devices.
But if comma is also used for multi-function device, can you show
me how it looks like? Is there any conflicts between it and the
pci options?
>
> IIRC, it doesn't really matter what the key is, as long as it
> is unique for a device. Which is why I think that leaving it
> as pci_dev_str should be ok.
Changing it back doesn't affect the pci options functionally, AFAIK.
Thanks,
Qing
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|