xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Juergen Gross <jgross@suse.com>
Cc: George.Dunlap@eu.citrix.com, ian.jackson@eu.citrix.com,
	Wei Liu <wei.liu2@citrix.com>,
	xen-devel@lists.xen.org
Subject: Re: [PATCH 5/6] libxl: add HVM usb passthrough support
Date: Thu, 15 Sep 2016 15:22:59 +0100	[thread overview]
Message-ID: <20160915142259.GN15958@citrix.com> (raw)
In-Reply-To: <a363bd17-e18b-cfaa-4776-0ce586ebd898@suse.com>

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@suse.com>
> > [...]
> >>  
> >> @@ -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@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2016-09-15 14:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-08  7:20 [PATCH 0/6] libxl: add HVM USB passthrough capability Juergen Gross
2016-09-08  7:20 ` [PATCH 1/6] libxl: rename libcl_pvusb.c to libxl_usb.c Juergen Gross
2016-09-09 10:00   ` Wei Liu
2016-09-08  7:20 ` [PATCH 2/6] libxl: add libxl__qmp_run_command_flexarray() function Juergen Gross
2016-09-09 10:00   ` Wei Liu
2016-09-08  7:20 ` [PATCH 3/6] libxl: dont pass array size to libxl__xs_kvs_of_flexarray() Juergen Gross
2016-09-09 10:00   ` Wei Liu
2016-09-12  9:18     ` Wei Liu
2016-09-08  7:20 ` [PATCH 4/6] libxl: add basic support for devices without backend Juergen Gross
2016-09-15 15:17   ` Wei Liu
2016-09-08  7:20 ` [PATCH 5/6] libxl: add HVM usb passthrough support Juergen Gross
2016-09-09 10:00   ` Wei Liu
2016-09-09 10:13     ` Juergen Gross
2016-09-15 14:22       ` Wei Liu [this message]
2016-09-12  8:51     ` George Dunlap
2016-09-15 15:38   ` Wei Liu
2016-09-16  8:51     ` Juergen Groß
2016-09-16 11:28       ` Wei Liu
2016-09-08  7:20 ` [PATCH 6/6] docs: add HVM USB passthrough documentation Juergen Gross
2016-09-15 15:38   ` Wei Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160915142259.GN15958@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jgross@suse.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).