qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] qapi: [PATCH v2] Implement query-usbhost QMP command


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] qapi: [PATCH v2] Implement query-usbhost QMP command
Date: Mon, 16 Apr 2018 10:29:44 +0200
User-agent: NeoMutt/20180323

On Sat, Apr 14, 2018 at 02:29:34AM -0700, Alexander Kappner wrote:
> Implement a QMP command similar to the HMP's "info usbhost" command.

The hmp version of the command should be switched over to call the
qmp_query_usbhost() and pretty-print the qapi struct then, to make
sure hmp and qmp versions of the command deliver consistent results.

> This allows a QMP client to query which USB devices may be available
> for redirection.

I'm wondering what the use case is?

At least libvirt sandboxes qemu, for security reasons, and you wouldn't
get any useful results because qemu hasn't the permissions needed to
scan the usb bus.

>  ##
> +# @query-usbhost:
> +#
> +# Returns information about USB devices available on the host
> +#
> +# Returns: a [UsbDeviceInfo]. Returns an error if compiled without
> +# CONFIG_USB_LIBUSB
> +#
> +# Since: TODO (maintainer insert version number if mainlined)

Will not make it into 2.12, so 2.13.

> +# @UsbDeviceInfo:
> +#
> +# @speed: the speed

Use an enum for this?

> +# @id_vendor: idVendor field from device descriptor
> +#
> +# @id_product: idProduct field from device descriptor
> +#
> +# @str_product: string descriptor referenced by iProduct index, if any
> +#
> +# @str_manufacturer: string descriptor referenced by iManufacturer index, if 
> any
> +#
> +# @dev_addr: address on bus that device is connected to
> +#
> +# @bus_num: bus number device is connected to

No port?

cheers,
  Gerd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]