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

[Xen-devel] çåï Re: [PATCH V3 3/6] libxl: add pvusb API




>>> å 2:16 ç 2015/5/20 äïåèæ
<CAFLBxZaw3zCsQ-8tJPH+3cVG4xS-J15_NA930hcRy8x4gRbinw@xxxxxxxxxxxxxx> äïGeorge
Dunlap <George.Dunlap@xxxxxxxxxxxxx> ååï
> On Sun, Apr 19, 2015 at 4:50 AM, Chunyan Liu <cyliu@xxxxxxxx> wrote:
> > +int libxl_device_usb_getinfo(libxl_ctx *ctx, char *busid, libxl_usbinfo 
> *usbinfo)
> > +{
> 
> Sorry, missed something.  This function is wrong.  It gives you
> information about a *host* USB device; but should properly give you
> information about a *guest* USB device.  The
> libxl_device_disk_getinfo() counterpart, for example, takes a domid
> and a virtual device (from within a libxl_disk structure) and returns
> information about that virtual device.

Maybe the name should be changed as libxl_device_usb_host_info.
Returning *host* USB device info itself is what we need, should not changed.

<ctrl, port> is the most important information to the virtual device. But like
in 'xl list', it will first list USB controller, and then each port, USB device
appears in some port, it doesn't need to show <ctrl, port> info again, but
host information is more useful. e.g.:
#xl usb-list test
Devid Type BE state usb-ver ports BE-path
0        pv     0     4      1         4      /local/domain/0/backend/vusb/1/0
    port 1: Bus 003 Device 005 ID:  8087:07dc Intel Corp.


- Chunyan


> 
> Hrm... which makes me wonder whether we should use <ctrl,port> as a
> unique "handle" for usb devices in the interface, or have a separate
> devid for the devices themselves.
> 
>  -George
> 

_______________________________________________
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®.