From: "Chun Yan Liu" Subject: Re: [PATCH RFC V2 0/5] pvusb toolstack work Date: Wed, 28 Jan 2015 20:22:07 -0700 Message-ID: <54CA17DF0200006600095E3D@relay2.provo.novell.com> References: <1421656131-19366-1-git-send-email-cyliu@suse.com> <1422460263.5187.27.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1422460263.5187.27.camel@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: lars.kurth@citrix.com, george.dunlap@eu.citrix.com, xen-devel@lists.xen.org, ian.jackson@citrix.com, caobosimon@gmail.com List-Id: xen-devel@lists.xenproject.org >>> On 1/28/2015 at 11:51 PM, in message <1422460263.5187.27.camel@citrix.com>, Ian Campbell wrote: > On Mon, 2015-01-19 at 16:28 +0800, Chunyan Liu wrote: > > This patch series is based on Simon's work. Since there is no progress > > after last August, I hope we can make this work proceed. Any comment will > > be very appreciated. > > > > It adds pvusb toolstack implementation, with pvusb kernel side work, > > one could attach/detach a usb device to guest. > > By any chance do you (or anyone else) have a link handy to the design > discussions for this stuff around the start of last year? Design Discussion Thread: http://www.redhat.com/archives/libvir-list/2014-June/msg00038.html > > In particular I'm hoping for some reminder on what the > libxl_usbctrl_type / libxl_usb_type options mean. According to the design discussion, the intention of these two structures was to unify PVUSB way and HVM QEMU emulated way. libxl_usbctrl_type is to differentiate it is PVUSB or QEMU emulated. George had a patch series to support add/remove usb in HVM by qemu emulated way. In that patch series, it uses libxl_usb_protocol to differeentiate PVUSB or QEMU emulated. http://lists.xen.org/archives/html/xen-devel/2014-06/msg00086.html libxl_usb_type is used in QEMU emulated way, since qemu usb-add support many usb types, like: host, tablet, mouse, keyboard, net, serial, disk, etc. For pvusb work only, this patch series sets libxl_usbctrl_type to 'PVUSB' always, and libxl_usb_type is not used. > > Although this is PV USB only I think the intention was to leave a > suitable hole for HVM emulated USB support. Or am I mis-remembering? Yes. It intended to leave hole for HVM QEMU emulated USB support. - Chunyan > > [...] > > tools/libxl/Makefile | 2 +- > > tools/libxl/libxl.c | 8 +- > > tools/libxl/libxl.h | 58 ++ > > tools/libxl/libxl_create.c | 41 +- > > tools/libxl/libxl_internal.h | 11 + > > tools/libxl/libxl_types.idl | 58 +- > > tools/libxl/libxl_types_internal.idl | 1 + > > tools/libxl/libxl_usb.c | 1277 > ++++++++++++++++++++++++++++++++++ > > tools/libxl/libxlu_cfg_y.c | 464 ++++++------ > > tools/libxl/libxlu_cfg_y.h | 38 +- > > tools/libxl/xl.h | 6 + > > tools/libxl/xl_cmdimpl.c | 296 +++++++- > > tools/libxl/xl_cmdtable.c | 30 + > > This will need some docs changes too, at least to the xl and xl.cfg > manpages. > > > 13 files changed, 2058 insertions(+), 232 deletions(-) > > create mode 100644 tools/libxl/libxl_usb.c > > > > > >