[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 Fri, Sep 09, 2016 at 12:13:46PM +0200, Juergen Gross wrote: > On 09/09/16 12:00, Wei Liu wrote: > > 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? > > Depends on what do you call a backend. > > I'd say a backend is something which corresponds to a frontend in the > guest. As long as you don't want to call a normal hardware driver a > "frontend" we don't need a backend. > > At least the "backend" (qemu, requiring no update for this) won't use > Xenstore for detecting addition/removal of devices: all is done via > explicit qmp commands issued from libxl to qemu. > After having a closer look, this is internal detail of libxl so I don't think I care that much. I will review this patch in detail later. Wei. > > Juergen _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |