>>> 在 2:16 的 2015/5/20 上,在讯息
<caflbxzaw3zcsq-8tjph+3cvg4xs-j15_na930hcry8x4grb...@mail.gmail.com> 中,George
Dunlap <george.dun...@eu.citrix.com> 写入:
> On Sun, Apr 19, 2015 at 4:50 AM, Chunyan Liu <cy...@suse.com> 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@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to