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

Re: [Xen-devel] [PATCH v6 2/2] xl: Add commands for usb hot-plug

On 04/25/2013 02:42 PM, Pasi Kärkkäinen wrote:
On Thu, Apr 25, 2013 at 12:57:50PM +0100, George Dunlap wrote:
On 04/25/2013 12:38 PM, Ian Campbell wrote:
On Thu, 2013-04-25 at 11:16 +0100, George Dunlap wrote:
+    for (i = 0; i < num; i++) {
+        printf("%8s  ", (dev[i].protocol==LIBXL_USB_PROTOCOL_PV)?"pv":"dm");

You can use libxl_usb_protocol_to_string here.

Could do, but I didn't necessarily want the long version ("devicemodel").

TBH the more I think about it the more I think DM/DEVICEMODEL in this
interface is leaking an implementation detail, after all the user
doesn't really care who/what is emulating a USB controller.

Protocol = {PV,OHCI,XHCI}?

As we covered before:

1. I have no way of selecting OHCI vs XHCI at this point


qemu -device usb-ehci,id=ehci \
      -device usb-tablet,bus=usb-bus.0 \
      -device usb-storage,bus=ehci.0,drive=usbstick

"This attaches a usb tablet to the UHCI adapter and a usb mass storage
device to the EHCI adapter."

qemu $args -device nec-usb-xhci,id=xhci -device usb-tablet,bus=xhci.0

qemu-kvm -device nec-usb-xhci,id=xhci -device 

So it seems it's possible to create ehci/usb2.0 and xhci/usb3.0 controllers as 
and attach devices to both of them by specifying the virtual bus..

2. Even if I did, why should the caller have to keep track of what
kind of USB hardware is exposed to the guest?  They should be able
to just say "Add" and have stuff sorted out.

Compatibility might be one reason why users want to specify specific virtual 
ie. some usb 2.0 devices don't work properly in usb 3.0 controllers, 

I'll take a look at implementing some of this when I come back to this series after the 4.3 release. But it seems like having a "controller type" option in the device field might be useful.

We should also look and see what libvirt exposes, at least for KVM, to get an idea what kinds of things might be useful to implement.


Xen-devel mailing list



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