[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] PV USB Use Case for Xen 4.x



On Thu, Aug 16, 2012 at 10:25:02AM +0100, Ian Campbell wrote:
> On Wed, 2012-08-15 at 18:07 +0100, Tom Parker wrote:
> > Good Afternoon.  My colleague Stefan (sstan) was asked on the IRC
> > channel to provide our use case for PV USB in our environment.  This
> > is possible with the current xm stack but not available with the xl
> > stack.
> 
> Thanks for doing this.
> 
> At first glance this doesn't seem like something which we could do for
> 4.2.0 at this stage, although we should do it for 4.3 and potentially
> consider it for 4.2.1.
> 
> Is it something which you guys might be interested in providing patches
> for? It is at heart a moderately simple C coding exercise, I'm more than
> happy to provide guidance etc. Much of the generic framework already
> exists and there are examples in the form of other device types.
> 
> > Currently we use PVUSB to attach a USB Smartcard reader through our
> > dom0 (SLES 11 SP1) running on an HP Blade Server with the Token
> > mounted on an internal USB Port to our domU CA server (SLES 11)
> > 
> > The config file syntax is broken so we have to manually attach (I have
> > it scripted) whenever our hosts reboot (which is almost never.)
> 
> Can you give an example of what the syntax *should* be?
> 
> > On the dom0 server I have to do the following steps:
> > 
> > /usr/sbin/xm usb-list-assignable-devices (get the bus-id of the USB
> > device)
> > /usr/sbin/xm usb-hc-create $Domain 2 2 (Create a USB 2.0 Root Hub with
> > 2 ports in $Domain)
> > /usr/sbin/xm usb-attach $Domain $DevId $PortNumber $BusId (Attach the
> > USB bus-id found in step 1 to the hub created in step 2)
> 
> What (if anything) is the output of these commands?
> 
> Do you need to do anything to make a device "assignable"? (I get no
> output from the list command for example)
> 
> > On the domU the lsusb looks like this after the above (before it
> > returns nothing)
> > 
> > mgaca:~ # lsusb 
> > Bus 001 Device 002: ID 04e6:5116 SCM Microsystems, Inc. SCR331-LC1
> > SmartCard Reader
> > Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> 
> Can you post the output of "xenstore-ls -fp" while the device is
> connected?
> 
> Do you happen to know if this uses the PVUSB drivers or some other
> mechanism? "lsmod" in both dom0 and domU should provide a clue if the
> drivers are loaded.
> 
> Does this work for both PV and HVM guests or do you only use one or the
> other?
> 
> > Once I have done this I can use the usb devce in the domU as if it was
> > directly connected. 
> > 
> > Thanks for your time.
> 
> Thank you for describing the functionality.
> 

We should also update / keep up-to-date this wiki page:
http://wiki.xen.org/wiki/Xen_USB_Passthrough

already earlier I added the missing USB features to :
http://wiki.xen.org/wiki/XL_vs_Xend_Feature_Comparison

Worth a note: in xm/xend there are two different kind of USB passthru methods 
available:

1) Xen qemu-dm usb 1.1 passthru for HVM guests.
2) Xen PVUSB usb 2.0 passthru for both PV and PVHVM guests.


-- Pasi


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.