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

Re: [Xen-devel] Deprecated option -usbdevice in QEMU



Adding Pasi, as he often has an interest in this sort of question.

On Wed, Mar 14, 2018 at 2:29 PM, Anthony PERARD
<anthony.perard@xxxxxxxxxx> wrote:
> Hi,
>
> In an xl guest config, we have the "usbdevice" option. It is just
> passthrough to QEMU "-usbdevice" without parsing. The QEMU option is now
> deprecated. v2.11 (to be released with Xen 4.11) is the last version of
> QEMU to have the option.
>
> Unfortunatly, our documentation relie on QEMU's documentation, so there
> would be a lot to parse if we want to keep the option.

Serves us right for exposing a deprecated interface. :-/

> I propose that we also deprecated the "usbdevice" option and find a
> suitable alternative (or we have to parse usbdevice in libxl).

qemu-traditional will continue to work as always, right?  So people
who really want to use something like this can specify
qemu-traditional.

That said, looking around the web, there are really only a handful of
examples people used for this; basically tablet and host passthrough.
It wouldn't be hard to parse a very limited subset of options and
convert them into more modern variants.  I think even if the *only*
thing we supported was "usbdevice=tablet", we'd make our users' lives
a lot easier.

> "usbdev" seems to be a good fit for that, and should already handle
> "usbdevice='host:bus.addr', but would be written:
> "usbdev=['type=hostdev,hostbus=bus,hostaddr=addr']"
>
> The other use of "usbdevice" documented on the man are:
> - tablet
> - host:vendor_id:product_id
>
> Other usage of "usbdevice" documented in the QEMU documentation:
> - mouse
> - disk:[format=format]:file
> - serial:[vendorid=vendor_id][,productid=product_id]:dev
> - braille
> - net:options
>
>
> From QEMU perspective, those options can be replaced the following
> cmdline options or QMP command equivalent (I haven't check everything):
> * -device usb-tablet
> * -device usb-host,vendorid=vendor,productid=product
> * -device usb-mouse
> * -drive if=none,id=drive_id,file=file  -device usb-storage,drive=drive_id
> * -chardev x,id=id -device usb-serial,chardev=id
> * -device usb-braille
> * -netdev x,id=id -device usb-net,netdev=id
>
>
> How the original "usbdevice" could be translated into a USBDEV_SPEC for
> "usbdev" ? Maybe for e.g.:
> 'type=tablet'
> 'type=storage,file=file,format=format'
>
> I don't know is anybody would be using "usbdevice='net:...'" or
> "usbdevice='serial:...'".
>
> What do you think?

I definitely think we should add "type=tablet" to "usbdev".  The other
ones are a nice-to-have that I wouldn't make a priority, with "USB
storage" probably being the nicest-to-have.

 -George

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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