xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Bo Cao <caobosimon@gmail.com>
To: xen-devel@lists.xensource.com
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
	Ian Jackson <ian.jackson@citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	Lars Kurth <lars.kurth@citrix.com>
Subject: [PATCH v0 RFC 0/2] xl/libxl support for PVUSB
Date: Mon, 11 Aug 2014 04:23:52 +0800	[thread overview]
Message-ID: <1407702234-22309-1-git-send-email-caobosimon@gmail.com> (raw)

Finally I have a workable version xl/libxl support for PVUSB. Most of
its commands work property now, but there are still some probelm to be solved.
Please take a loot and give me some advices.

== What have been implemented ? ==
I have implemented libxl functions for PVUSB in libxl_usb.c. It mainly consists of two part:
usbctrl_add/remove/list and usb_add/remove/list in which usbctrl denote usb controller in which
usd device can be plugged in. I don't use "ao_dev" in libxl_deivce_usbctrl_add since we don't need to
execute hotplug script for usbctrl and without "ao_dev", adding default usbctrl for usb device
would be easier.

For the cammands to manipulate usb device such as "xl usb-attach" and "xl usb-detach", this patch now only
support to specify usb devices by their interface in sysfs. Using this interface, we can read usb device
information through sysfs and bind/unbind usb device. (The support for mapping the "lsusb" bus:addr to the
sysfs usb interface will come later).

== What needs to do next ? ==
There are two main problems to be solved.

1.  PVUSB Options in VM Guest's Configuration File
    The interface in VM Guest's configuration file to add usb device is: "usb=[interface="1-1"]".
But the problem is now is that after the default usbctrl is added, the state of usbctrl is "2", e,g, "XenbusStateInitWait",
waiting for xen-usbfront to connect. The xen-usbfront in VM Guest isn't loaded. Therefore, "sysfs_intf_write"
will report error. Does anyone have any clue how to solve this?

2. sysfs_intf_write
    In the process of "xl usb-attach domid intf=1-1", after writing "1-1" to Xenstore entry, we need to
bind the controller of this usb device to usbback driver so that it can be used by VM Guest. For exampele,
for usb device "1-1", it's controller interface maybe "1-1:1.0", and we write this value to "/sys/bus/usb/driver/usbback/bind".
But for some devices, they have two controllers, for example "1-1:1.0" and "1-1:1.1". I think this means it has two functions,
such as usbhid and usb-storage. So in this case, we bind the two controller to usbback?

========
There maybe some errors or bugs in the codes. Feel free to tell me.

Cheers,

- Simon

---
CC: George Dunlap <george.dunlap@eu.citrix.com>
CC: Ian Jackson <ian.jackson@citrix.com>
CC: Ian Campbell <ian.campbell@citrix.com>
CC: Pasi Kärkkäinen <pasik@iki.fi>
CC: Lars Kurth <lars.kurth@citrix.com>



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

             reply	other threads:[~2014-08-10 20:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-10 20:23 Bo Cao [this message]
2014-08-10 20:23 ` [PATCH v0 RFC 1/2] libxl: Introduce functions in libxl to add and remove USB devices for an PV guest Bo Cao
2014-08-12 16:11   ` Ian Jackson
2014-08-13 13:18     ` Simon Cao
2014-08-10 20:23 ` [PATCH v0 RFC 2/2] xl: Add commands for usb hot-plug Bo Cao
2014-08-14 15:04 ` [PATCH v0 RFC 0/2] xl/libxl support for PVUSB George Dunlap
2014-08-14 15:46   ` Simon Cao
2014-11-10  8:37 ` Chun Yan Liu
2014-11-10 15:01   ` Konrad Rzeszutek Wilk
2014-11-11  5:06     ` Juergen Gross
2014-11-16  2:36   ` Simon Cao
2014-11-19 21:32     ` Konrad Rzeszutek Wilk

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=1407702234-22309-1-git-send-email-caobosimon@gmail.com \
    --to=caobosimon@gmail.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@citrix.com \
    --cc=lars.kurth@citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).