Re: [Xen-devel] [PATCH V8 5/7] xl: add pvusb commands
On 13/11/15 02:43, Chun Yan Liu wrote: >>> +By default, it will create a USB2.0 controller with 8 ports. >>> + >>> +=item B I I >>> + >>> +Destroy a USB controller from the specified domain. >>> +B is devid of the USB controller. >>> + >>> +If B<-f> is specified, B is going to forcefully remove the device even >>> +without guest's collaboration. >> >> "If B<-f> is specified, B will forcefully remove removal (i.e., >> without the guest's cooperation)." Sorry, I'm looking again at what I wrote here and it's gibberish! Let me try again: "If B<-f> is specified, B will force removal (i.e., without the guest's cooperation)." -George ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH V8 5/7] xl: add pvusb commands
On Wed, Oct 21, 2015 at 10:08 AM, Chunyan Liuwrote: > Add pvusb commands: usbctrl-attach, usbctrl-detach, usb-list, > usb-attach and usb-detach. > > To attach a usb device to guest through pvusb, one could follow > following example: > > #xl usbctrl-attach test_vm version=1 ports=8 > > #xl usb-list test_vm > will show the usb controllers and port usage under the domain. > > #xl usbattach test_vm hostbus=1 hostaddr=2 Nit: usb-attach (missing a '-') > will find the first usable controller:port, and attach usb > device whose busnum is 1 and devnum is 6. > One could also specify which and which . > > #xl usb-detach test_vm 0 1 > will detach USB device under controller 0 port 1. > > #xl usbctrl-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 > Signed-off-by: Simon Cao > > --- > Changes: > - change usb-attach parameter from hostbus.hostaddr to > hostbus=xx hostaddr= > - since we get rid of libxl_device_usb_getinfo, so adjust usb-list > information a little bit. > - parse_usb_config and parse_usbctrl_config following parse_nic_config > way, put in this patch, and shared domcreate routine. > > docs/man/xl.pod.1 | 40 > tools/libxl/xl.h | 5 + > tools/libxl/xl_cmdimpl.c | 250 > ++ > tools/libxl/xl_cmdtable.c | 25 + > 4 files changed, 320 insertions(+) > > diff --git a/docs/man/xl.pod.1 b/docs/man/xl.pod.1 > index d0cd612..f09a872 100644 > --- a/docs/man/xl.pod.1 > +++ b/docs/man/xl.pod.1 > @@ -1345,6 +1345,46 @@ List pass-through pci devices for a domain. > > =back > > +=head1 USB PASS-THROUGH > + > +=over 4 > + > +=item B I
Re: [Xen-devel] [PATCH V8 5/7] xl: add pvusb commands
On Thu, Nov 12, 2015 at 2:42 PM, Olaf Heringwrote: > On Wed, Oct 21, Chunyan Liu wrote: > >> Add pvusb commands: usbctrl-attach, usbctrl-detach, usb-list, >> usb-attach and usb-detach. > > How is this supposed to be handled in libvirt? It looks like libvirt has > to copy what is done here. If thats true the logic should be in libxlu > so that both xl and libvirt can call the same functions. What logic are you talking about? The usb code in xl mirrors all the other code (nic, disk, ). In any case, I think it would be the person writing the libvirt bindings who would be responsible for abstracting things like that (just as I will have to do a bit of re-work to get the HVM usb stuff implemented). -George ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH V8 5/7] xl: add pvusb commands
On Wed, Oct 21, Chunyan Liu wrote: > Add pvusb commands: usbctrl-attach, usbctrl-detach, usb-list, > usb-attach and usb-detach. How is this supposed to be handled in libvirt? It looks like libvirt has to copy what is done here. If thats true the logic should be in libxlu so that both xl and libvirt can call the same functions. Olaf ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH V8 5/7] xl: add pvusb commands
>>> On 11/12/2015 at 07:38 PM, in message
Re: [Xen-devel] [PATCH V8 5/7] xl: add pvusb commands
>>> On 11/12/2015 at 10:42 PM, in message <20151112144211.ga5...@aepfle.de>, >>> Olaf Heringwrote: > On Wed, Oct 21, Chunyan Liu wrote: > > > Add pvusb commands: usbctrl-attach, usbctrl-detach, usb-list, > > usb-attach and usb-detach. > > How is this supposed to be handled in libvirt? It looks like libvirt has > to copy what is done here. If thats true the logic should be in libxlu > so that both xl and libvirt can call the same functions. For usbctrl-attach/detach, usb-attach/detach, libxl has API, like libxl_device_usbctrl_add/remove, libxl_device_usb_add/remove. That's could be used for libvirt usage. The user interface processing things are always do-by-itslef for xl and libvirt, what's libvirt needs to do is preparing the usbctrl/usb device structure and call libxl API to do the work. - Chunyan > > Olaf > > ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH V8 5/7] xl: add pvusb commands
On 10/21/2015 11:08 AM, Chunyan Liu wrote: Add pvusb commands: usbctrl-attach, usbctrl-detach, usb-list, usb-attach and usb-detach. To attach a usb device to guest through pvusb, one could follow following example: #xl usbctrl-attach test_vm version=1 ports=8 #xl usb-list test_vm will show the usb controllers and port usage under the domain. #xl usbattach test_vm hostbus=1 hostaddr=2 will find the first usable controller:port, and attach usb device whose busnum is 1 and devnum is 6. One could also specify which and which . #xl usb-detach test_vm 0 1 will detach USB device under controller 0 port 1. #xl usbctrl-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 LiuSigned-off-by: Simon Cao Acked-by: Juergen Gross juergen ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
[Xen-devel] [PATCH V8 5/7] xl: add pvusb commands
Add pvusb commands: usbctrl-attach, usbctrl-detach, usb-list, usb-attach and usb-detach. To attach a usb device to guest through pvusb, one could follow following example: #xl usbctrl-attach test_vm version=1 ports=8 #xl usb-list test_vm will show the usb controllers and port usage under the domain. #xl usbattach test_vm hostbus=1 hostaddr=2 will find the first usable controller:port, and attach usb device whose busnum is 1 and devnum is 6. One could also specify which and which . #xl usb-detach test_vm 0 1 will detach USB device under controller 0 port 1. #xl usbctrl-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 LiuSigned-off-by: Simon Cao --- Changes: - change usb-attach parameter from hostbus.hostaddr to hostbus=xx hostaddr= - since we get rid of libxl_device_usb_getinfo, so adjust usb-list information a little bit. - parse_usb_config and parse_usbctrl_config following parse_nic_config way, put in this patch, and shared domcreate routine. docs/man/xl.pod.1 | 40 tools/libxl/xl.h | 5 + tools/libxl/xl_cmdimpl.c | 250 ++ tools/libxl/xl_cmdtable.c | 25 + 4 files changed, 320 insertions(+) diff --git a/docs/man/xl.pod.1 b/docs/man/xl.pod.1 index d0cd612..f09a872 100644 --- a/docs/man/xl.pod.1 +++ b/docs/man/xl.pod.1 @@ -1345,6 +1345,46 @@ List pass-through pci devices for a domain. =back +=head1 USB PASS-THROUGH + +=over 4 + +=item B I