|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH V4 5/7] xl: add pvusb commands
On 06/10/2015 05:20 AM, Chunyan Liu wrote: Add pvusb commands: usb-ctrl-attach, usb-ctrl-detach, usb-list, usb-attach and usb-detach. To attach a usb device to guest through pvusb, one could follow following example: #xl usb-ctrl-attach test_vm version=1 num_ports=8 #xl usb-list test_vm will show the usb controllers and port usage under the domain. #xl usb-assignable-list will list assignable USB devices xl usb-assignable-list is not part of this patch. Either merge this patch and the following one, or describe the command in the next patch. #xl usb-attach test_vm 1.6 will find the first usable controller:port, and attach usb device whose bus address is 1.6 (busnum is 1, devnum is 6) to it. One could also specify which <controller> and which <port>. #xl usb-detach test_vm 1.6 #xl usb-ctrl-detach test_vm dev_id will destroy the controller with specified dev_id. Dev_id can be traced in usb-list info. Signed-off-by: Chunyan Liu <cyliu@xxxxxxxx> Signed-off-by: Simon Cao <caobosimon@xxxxxxxxx> --- docs/man/xl.pod.1 | 38 +++++++ tools/libxl/xl.h | 5 + tools/libxl/xl_cmdimpl.c | 251 ++++++++++++++++++++++++++++++++++++++++++++++ tools/libxl/xl_cmdtable.c | 25 +++++ 4 files changed, 319 insertions(+) ... Blank line missing. Blank line missing. Is it really possible for a device to be assigned but without a port number? I'd rather combine the two if's and printf statements. This would avoid the case where " Port 1: Port 2: ..." is printed due to a failing libxl_device_usb_getinfo() for port 1. Shouldn't you check for valid versions? Same here for number of ports. Otherwise you could blow up xenstore by e.g. specifying 2 billion ports here. Is this really necessary? You do it in libxl, too. Juergen _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |