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

Re: [Xen-devel] [PATCH v3 07/15] libxl: disallow attaching the same device more than once



On Mon, Nov 17, 2014 at 10:55:34AM +0000, Li, Liang Z wrote:
> > > The libxl__device_exists will return 1 if more than one PCI devices are 
> > > attached to the guest, no matter the BDFs are identical or not.
> >
> > That means this check is problematic. I think the original intention was to 
> > check on BDFs, however it wasn't thoroughly tested. Sorry.
> >
> > > I don't understand why to check this condition here, if the same 
> > > device was attached more than once the xc_test_assign_device() will 
> > > return error, and the libxl__device_pci_add_xenstore() will not be 
> > > called. It seems unnecessary.
> > > 
> >
> > It was added to be in line with other devices. However from the look of it 
> > PCI devices need special treatment? Do you have some PCI dev backend paths 
> > at hand?
> >
> 
> Backend paths example for tow PCI devices:
> /loacal/domain/0/backend/pci/9/0/dev-1/0000:03:10.1
> /loacal/domain/0/backend/pci/9/0/key-1/0000:03:10.1
> 
> /loacal/domain/0/backend/pci/9/0/dev-2/0000:03:10.2
> /loacal/domain/0/backend/pci/9/0/key-2/0000:03:10.2
> 
> These paths can help to identify the PCI devices. But I don't think it is a 
> good idea to check all the PCI devices in the backend paths.
> 

So that means that PCI devices have different rules when constructing
backend path. And the check should adapt to these rules.

> > Does reverting the said patch help?
> 
> > Wei.
> 
> 
> I just remove the if (rc == 1) condition check and it works ok.
> 

This is basically reverting that patch.

This is a regression, right? I'm thinking about reverting the hunk to
check device existence at this point and deal with it in 4.6.

Wei.

> Liang

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.