All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Chunyan Liu <cyliu@suse.com>
Cc: lars.kurth@citrix.com, george.dunlap@eu.citrix.com,
	xen-devel@lists.xen.org, ian.jackson@citrix.com,
	caobosimon@gmail.com
Subject: Re: [PATCH RFC V2 4/5] xl: add pvusb commands
Date: Tue, 3 Mar 2015 11:43:04 +0000	[thread overview]
Message-ID: <1425382984.24959.115.camel@citrix.com> (raw)
In-Reply-To: <1421656131-19366-5-git-send-email-cyliu@suse.com>

On Mon, 2015-01-19 at 16:28 +0800, Chunyan Liu wrote:
> Add pvusb commands.
> 
> 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 all assignable usb devices now in host, with their
>  sysfs interface. (This is very useful since later we will use
>  sysfs interface to attach a usb devie to guest)
> 
>  #xl usb-attach test_vm 2-1.1
>  will find the first usable controller:port, and attach usb
>  device with sysfs interface 2-1.1 (sys/bus/usb/devices/2-1.1)
>  to it. One could also specify which <controller> and which <port>
> 
>  #xl usb-detach test_vm 2-1.1
> 
>  #xl usb-ctrl-detach test_vm dev_id
>  will destroy the controller with dev_id as specified. Dev_id
>  can be traced in usb-list info
> 
> Signed-off-by: Chunyan Liu <cyliu@suse.com>
> Signed-off-by: Simon Cao <caobosimon@gmail.com>
> ---
>  tools/libxl/xl.h          |   6 ++
>  tools/libxl/xl_cmdimpl.c  | 256 ++++++++++++++++++++++++++++++++++++++++++++++
>  tools/libxl/xl_cmdtable.c |  30 ++++++

This patch should also touch docs/man/xl*.pod I think.

> +int main_usbassignable_list(int argc, char **argv)
> +{
> +    int opt;
> +
> +    SWITCH_FOREACH_OPT(opt, "", NULL, "usb-assignable-list", 0) {
> +        /* No options */
> +    }
> +
> +    usb_assignable_list();

Unless there are other callers or a good reason to factor it out (e.g.
complexity) you can just do the operation inline here if you like.

The rest of it seems pretty straightforward and looked ok to me.

Ian.

  parent reply	other threads:[~2015-03-03 11:43 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-19  8:28 [PATCH RFC V2 0/5] pvusb toolstack work Chunyan Liu
2015-01-19  8:28 ` [PATCH RFC V2 1/5] libxl: add pvusb definitions Chunyan Liu
2015-03-03 11:10   ` Ian Campbell
2015-03-03 16:45     ` George Dunlap
2015-03-04  7:26     ` Chun Yan Liu
2015-03-04 10:00       ` Ian Campbell
2015-03-04 12:26         ` George Dunlap
2015-03-04 12:33           ` Ian Campbell
2015-03-05  5:04             ` Chun Yan Liu
2015-03-03 17:15   ` George Dunlap
2015-03-04  8:28     ` Chun Yan Liu
2015-03-04 14:41       ` George Dunlap
2015-03-05  6:07         ` Chun Yan Liu
2015-01-19  8:28 ` [PATCH RFC V2 2/5] libxl: export some functions for pvusb use Chunyan Liu
2015-03-03 11:10   ` Ian Campbell
2015-01-19  8:28 ` [PATCH RFC V2 3/5] libxl: add pvusb API Chunyan Liu
2015-01-28 15:54   ` Ian Campbell
2015-01-29  3:24     ` Chun Yan Liu
2015-02-10 10:08   ` Jürgen Groß
2015-02-10 16:01   ` Jürgen Groß
2015-03-03 11:38   ` Ian Campbell
2015-03-04  7:47     ` Chun Yan Liu
2015-03-06 16:50   ` George Dunlap
2015-03-09  9:39     ` Ian Campbell
2015-03-09 10:17       ` George Dunlap
2015-03-09 10:41         ` Ian Campbell
2015-03-20  9:37     ` Chun Yan Liu
2015-03-17 14:03   ` Juergen Gross
2015-01-19  8:28 ` [PATCH RFC V2 4/5] xl: add pvusb commands Chunyan Liu
2015-02-10  6:25   ` Jürgen Groß
2015-03-03 11:43   ` Ian Campbell [this message]
2015-03-04  7:48     ` Chun Yan Liu
2015-03-06 17:25   ` George Dunlap
2015-03-20  9:02     ` Chun Yan Liu
2015-01-19  8:28 ` [PATCH RFC V2 5/5] domcreate: support pvusb in configuration file Chunyan Liu
2015-03-03 11:44   ` Ian Campbell
2015-01-28 15:51 ` [PATCH RFC V2 0/5] pvusb toolstack work Ian Campbell
2015-01-28 16:07   ` Pasi Kärkkäinen
2015-01-28 16:17     ` Ian Campbell
2015-01-29  3:22   ` Chun Yan Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1425382984.24959.115.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=caobosimon@gmail.com \
    --cc=cyliu@suse.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=ian.jackson@citrix.com \
    --cc=lars.kurth@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.