From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH V4 3/7] libxl: add pvusb API Date: Thu, 18 Jun 2015 09:50:38 +0100 Message-ID: <1434617438.28264.22.camel@citrix.com> References: <1433906441-3280-1-git-send-email-cyliu@suse.com> <1433906441-3280-4-git-send-email-cyliu@suse.com> <21887.64856.265751.921367@mariner.uk.xensource.com> <558000E5.9000803@suse.com> <21888.1058.681450.470806@mariner.uk.xensource.com> <5580079D.6070007@suse.com> <21888.3180.937801.173964@mariner.uk.xensource.com> <55801F56.1090906@suse.com> <55802025.2020102@eu.citrix.com> <55802339.40808@suse.com> <558024B3.2060303@eu.citrix.com> <55802977.8060309@suse.com> <55802D6D.2030108@eu.citrix.com> <558030BD.5050709@suse.com> <1434540857.13744.334.camel@citrix.com> <5582D39102000066000D8846@relay2.provo.novell.com> <55826D01.3080008@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <55826D01.3080008@suse.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Juergen Gross Cc: Wei Liu , George Dunlap , Ian Jackson , Chun Yan Liu , "xen-devel@lists.xen.org" , Jim Fehlig , Simon Cao List-Id: xen-devel@lists.xenproject.org On Thu, 2015-06-18 at 09:02 +0200, Juergen Gross wrote: > On 06/18/2015 08:20 AM, Chun Yan Liu wrote: > > > > > >>>> On 6/17/2015 at 07:34 PM, in message <1434540857.13744.334.camel@citrix.com>, > > Ian Campbell wrote: > >> On Tue, 2015-06-16 at 16:20 +0200, Juergen Gross wrote: > >>> My point was to avoid the sysfs accesses in libxl in order to support > >>> BSD as well and to reduce the complexity. > >> > >> As a slight aside to this, can't libxl use libusb for a lot of this > >> stuff and therefore avoid being Linux specific? > >> > >> http://libusb.info/ claims to support "Linux, OS X, Windows, Windows CE, > >> Android, OpenBSD/NetBSD, Haiku.". Interestingly FreeBSD is missing there > >> but I don't think that need to be a blocker. > >> > >> I don't see a problem with adding libusb to our set of dependencies, and > >> it's certainly got to be better than (re)implementing a bunch of sysfs > >> stuff (which I presume is what libusb does under the hood anyway). > > > > Using libusb is certainly good and can save effort to implement things by > > ourself. Only one concern: some functions require newer version of libusb. > > For example, functions to get port (quite like busid) information > > libusb_get_port_numbers or libusb_get_port_path need > > libusb version >= 1.0.12. If libusb version is not satisfied, the whole pvusb > > work might be blocked. > > Is this really a problem? lubusb version 1.0.12 is out for three years > now. Would we really need to support pvUSB on dom0 not being capable > to install a more recent libusb? Of interest would be which distro versions have >= 1.0.12 i.e. for common things like Debian, SuSE, SLE, Fedora etc. Even that may not be an absolute blocker, I don't think it would be too bad to say that for an older stable distro either an up to date libusb is made available or the pvusb functionality is disabled at build time (automatically, by configure.ac). The latter would be some faff to arrange but I think saying that Xen doesn't build on older stable distros unless you backport a libusb might be a step to far. Ian.