WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH] xend: fix options for assigned pci

To: Simon Horman <horms@xxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] xend: fix options for assigned pci
From: Qing He <qing.he@xxxxxxxxx>
Date: Mon, 11 Jan 2010 15:24:59 +0800
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, "stefano.stabellini@xxxxxxxxxxxxx" <stefano.stabellini@xxxxxxxxxxxxx>
Delivery-date: Sun, 10 Jan 2010 23:26:14 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20100111071636.GA11771@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20100108082904.GA31397@ub-qhe2> <20100111071636.GA11771@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.20 (2009-06-14)
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