Re: [Xen-devel] [PATCH V7 3/7] libxl: add pvusb API

2015-10-13 Thread Chun Yan Liu
On 10/13/2015 09:15 PM, George Dunlap wrote: On 13/10/15 02:46, Chun Yan Liu wrote: On 10/12/2015 09:46 PM, George Dunlap wrote: On 12/10/15 08:19, Chun Yan Liu wrote: + +usbinfo->devnum = usb->u.hostdev.hostaddr; +usbinfo->busnum = usb->u.hostdev.hostbus; + +busid = usb_busaddr

Re: [Xen-devel] [PATCH V7 3/7] libxl: add pvusb API

2015-10-13 Thread Ian Campbell
On Tue, 2015-10-13 at 14:15 +0100, George Dunlap wrote: > In the absence of guidance to the contrary, I suggest that patch series > should focus on getting the core pvusb functionality in, without the > extra usb-querying bits. Then we can discuss a further series which > either adds the usb query

Re: [Xen-devel] [PATCH V7 3/7] libxl: add pvusb API

2015-10-13 Thread George Dunlap
On 13/10/15 14:15, George Dunlap wrote: > On 13/10/15 02:46, Chun Yan Liu wrote: >> >> >> On 10/12/2015 09:46 PM, George Dunlap wrote: >>> On 12/10/15 08:19, Chun Yan Liu wrote: >> + >> +usbinfo->devnum = usb->u.hostdev.hostaddr; >> +usbinfo->busnum = usb->u.hostdev.hostbus; >>>

Re: [Xen-devel] [PATCH V7 3/7] libxl: add pvusb API

2015-10-13 Thread George Dunlap
On 13/10/15 02:46, Chun Yan Liu wrote: > > > On 10/12/2015 09:46 PM, George Dunlap wrote: >> On 12/10/15 08:19, Chun Yan Liu wrote: > + > +usbinfo->devnum = usb->u.hostdev.hostaddr; > +usbinfo->busnum = usb->u.hostdev.hostbus; > + > +busid = usb_busaddr_to_busid(gc

Re: [Xen-devel] [PATCH V7 3/7] libxl: add pvusb API

2015-10-12 Thread Chun Yan Liu
On 10/12/2015 09:46 PM, George Dunlap wrote: On 12/10/15 08:19, Chun Yan Liu wrote: + +usbinfo->devnum = usb->u.hostdev.hostaddr; +usbinfo->busnum = usb->u.hostdev.hostbus; + +busid = usb_busaddr_to_busid(gc, usb->u.hostdev.hostbus, + usb->u.hostdev.

Re: [Xen-devel] [PATCH V7 3/7] libxl: add pvusb API

2015-10-12 Thread George Dunlap
On 12/10/15 08:19, Chun Yan Liu wrote: >>> + >>> +usbinfo->devnum = usb->u.hostdev.hostaddr; >>> +usbinfo->busnum = usb->u.hostdev.hostbus; >>> + >>> +busid = usb_busaddr_to_busid(gc, usb->u.hostdev.hostbus, >>> + usb->u.hostdev.hostaddr); >>> +

Re: [Xen-devel] [PATCH V7 3/7] libxl: add pvusb API

2015-10-12 Thread Chun Yan Liu
>>> On 10/1/2015 at 01:55 AM, in message <560c2204.9030...@citrix.com>, George Dunlap wrote: > On 25/09/15 03:11, Chunyan Liu wrote: > > Add pvusb APIs, including: > > - attach/detach (create/destroy) virtual usb controller. > > - attach/detach usb device > > - list usb controllers and u

Re: [Xen-devel] [PATCH V7 3/7] libxl: add pvusb API

2015-10-12 Thread Chun Yan Liu
>>> On 10/8/2015 at 10:41 PM, in message <22038.32910.375958.407...@mariner.uk.xensource.com>, Ian Jackson wrote: > Chunyan Liu writes ("[PATCH V7 3/7] libxl: add pvusb API"): > > Add pvusb APIs, including: > ... > > > +/* Utility to read backend xenstore keys */ > > +#define READ_BACKEND

Re: [Xen-devel] [PATCH V7 3/7] libxl: add pvusb API

2015-10-09 Thread Chun Yan Liu
>>> On 10/1/2015 at 01:55 AM, in message <560c2204.9030...@citrix.com>, George Dunlap wrote: > On 25/09/15 03:11, Chunyan Liu wrote: > > Add pvusb APIs, including: > > - attach/detach (create/destroy) virtual usb controller. > > - attach/detach usb device > > - list usb controllers and u

Re: [Xen-devel] [PATCH V7 3/7] libxl: add pvusb API

2015-10-08 Thread Ian Jackson
Ian Campbell writes ("Re: [PATCH V7 3/7] libxl: add pvusb API"): > Since this is part of a new "controller" abstraction we do in theory have > the freedom to do things differently, but it seems to me that having > something as basic as the list operation differ for devices vs. controller > would do

Re: [Xen-devel] [PATCH V7 3/7] libxl: add pvusb API

2015-10-08 Thread Ian Campbell
On Thu, 2015-10-08 at 15:41 +0100, Ian Jackson wrote: > > +libxl_device_usbctrl * > > +libxl_device_usbctrl_list(libxl_ctx *ctx, uint32_t domid, int *num) > > +{ > > This function should return an rc, and the list should come in an out > parameter. For better of worse libxl.h defines the general

Re: [Xen-devel] [PATCH V7 3/7] libxl: add pvusb API

2015-10-08 Thread Ian Jackson
Chunyan Liu writes ("[PATCH V7 3/7] libxl: add pvusb API"): > Add pvusb APIs, including: ... > +/* Utility to read backend xenstore keys */ > +#define READ_BACKEND(tgc, subpath)\ > +libxl__xs_read(tgc, XBT_NULL, GCSPRINTF("%s/" subpath, be_path)) > +

Re: [Xen-devel] [PATCH V7 3/7] libxl: add pvusb API

2015-10-02 Thread Ian Campbell
On Wed, 2015-09-30 at 18:55 +0100, George Dunlap wrote: > > +int libxl_devid_to_device_usbctrl(libxl_ctx *ctx, > > + uint32_t domid, > > + int devid, > > + libxl_device_usbctrl *usbctrl) > > +{ > > +

Re: [Xen-devel] [PATCH V7 3/7] libxl: add pvusb API

2015-09-30 Thread George Dunlap
On 25/09/15 03:11, Chunyan Liu wrote: > Add pvusb APIs, including: > - attach/detach (create/destroy) virtual usb controller. > - attach/detach usb device > - list usb controllers and usb devices > - get information of usb controller and usb device > - some other helper functions > > Signed-o

[Xen-devel] [PATCH V7 3/7] libxl: add pvusb API

2015-09-24 Thread Chunyan Liu
Add pvusb APIs, including: - attach/detach (create/destroy) virtual usb controller. - attach/detach usb device - list usb controllers and usb devices - get information of usb controller and usb device - some other helper functions Signed-off-by: Chunyan Liu Signed-off-by: Simon Cao --- chan