|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 5/6] libxl: add HVM usb passthrough support
On Thu, Sep 08, 2016 at 09:20:25AM +0200, Juergen Gross wrote:
> Add HVM usb passthrough support to libxl by using qemu's capability
> to emulate standard USB controllers.
>
> A USB controller is added via qmp command to the emulated hardware
> when a usbctrl device of type DEVICEMODEL is requested. Depending on
> the requested speed the appropriate hardware type is selected. A host
> USB device can then be added to the emulated USB controller via qmp
> command.
>
> Removing of the devices is done via qmp commands, too.
>
> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
[...]
>
> @@ -75,9 +131,19 @@ static int libxl__device_from_usbctrl(libxl__gc *gc,
> uint32_t domid,
> {
> device->backend_devid = usbctrl->devid;
> device->backend_domid = usbctrl->backend_domid;
> - device->backend_kind = (usbctrl->type == LIBXL_USBCTRL_TYPE_PV)
> - ? LIBXL__DEVICE_KIND_VUSB
> - : LIBXL__DEVICE_KIND_QUSB;
> + switch (usbctrl->type) {
> + case LIBXL_USBCTRL_TYPE_PV:
> + device->backend_kind = LIBXL__DEVICE_KIND_VUSB;
> + break;
> + case LIBXL_USBCTRL_TYPE_QUSB:
> + device->backend_kind = LIBXL__DEVICE_KIND_QUSB;
> + break;
> + case LIBXL_USBCTRL_TYPE_DEVICEMODEL:
> + device->backend_kind = LIBXL__DEVICE_KIND_NONE;
I'm not quite sure if I follow this. Shouldn't we need a new kind of
backend for this?
Wei.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |