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

Re: [Xen-devel] [PATCH v5 3/5] libxl: add new pvusb backend "qusb" provided by qemu



On 30/03/16 16:19, Wei Liu wrote:
> On Wed, Mar 30, 2016 at 02:05:56PM +0200, Juergen Gross wrote:
>> Add a new pvusb backend type "qusb" which is provided by qemu. It can
>> be selected either by specifying the type directly in the configuration
>> or it is selected automatically by libxl in case there is no "usbback"
>> driver loaded.
>>
>> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
>> ---
>> V4: bail out in case of usbback_is_loaded() error as requested by
>>     Chun Yan Liu
>> ---
> [...]
>>  /* Add usbctrl information to xenstore.
>>   *
>> - * Adding a usb controller will add a new 'vusb' device in xenstore, and
>> - * add corresponding frontend, backend information to it. According to
>> - * "update_json", decide wether to update json config file.
>> + * Adding a usb controller will add a new 'qusb' or 'vusb' device in 
>> xenstore,
>> + * and add corresponding frontend, backend information to it. According to
>> + * "update_json", decide whether to update json config file.
>>   */
>>  static int libxl__device_usbctrl_add_xenstore(libxl__gc *gc, uint32_t domid,
>>                                                libxl_device_usbctrl *usbctrl,
>> @@ -121,6 +144,15 @@ static int libxl__device_usbctrl_add_xenstore(libxl__gc 
>> *gc, uint32_t domid,
>>  
>>          DEVICE_ADD(usbctrl, usbctrls, domid, &usbctrl_saved,
>>                     COMPARE_USBCTRL, &d_config);
>> +
>> +        if (usbctrl->type == LIBXL_USBCTRL_TYPE_QUSB) {
>> +            if (!libxl__query_qemu_backend(gc, domid, 
>> usbctrl->backend_domid,
>> +                                           "qusb", false)) {
> 
> This needs to be sorted out.

What do you mean?

> And this is maybe a rather dumb question: the xenstore paths for qusb
> and kernel backend are the same? What is the likelihood that one
> deviates from the other? Note that this is not suggesting that you
> over-engineer current code, it's just something that needs clarifying.

There is an existing pvusb kernel backend implementation in kernel-xen
of openSUSE and SLE. The port of that implementation hasn't been
accepted in Linux upstream as it was regarded to fit better in qemu.

So the qemu base backend is designed in a way to be compatible to the
already existing kernel backend. Future enhancements will be made on the
qemu based backend only (as far as SUSE is involved).

So the frontend related Xenstore paths are the same, while the backend
paths are different ("vusb" vs. "qusb"). And yes, I've tested the same
domU with both backends.


Juergen


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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