All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@eu.citrix.com>
To: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Roger Pau Monne <roger.pau@citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	Marek Marczykowski <marmarek@invisiblethingslab.com>
Subject: RFC: Proposed libxl USB hot-plug interface
Date: Wed, 3 Apr 2013 16:11:32 +0100	[thread overview]
Message-ID: <515C46A4.8060506@eu.citrix.com> (raw)

OK, based on the feedback, what about an interface like the following?

The idea would be that long-term, AUTO would always do PV for PV VMs, 
and would somehow decide whether to do HVM or PV for HVM domains.

The "type" and the "union" fields are designed to allow the interface to 
be extended to include other types of devices, such as adding emulated 
tablets, mice, keyboards, usb sticks, &c.

"list" should return all available USB devices including the "handle" 
that can be used to remove a device.

Thoughts?

  -George

#define LIBXL_DEVICE_HOST_USB_ANY (-1)
int libxl_usb_add(libxl_ctx *ctx, uint32_t domid,
                   libxl_device_usb *dev,
                   const libxl_asyncop_how *ao_how)
                   LIBXL_EXTERNAL_CALLERS_ONLY;
int libxl_usb_del(libxl_ctx *ctx, uint32_t domid,
                   uint64_t handle,
                   const libxl_asyncop_how *ao_how)
                   LIBXL_EXTERNAL_CALLERS_ONLY;
int libxl_usb_list(libxl_ctx *ctx, uint32_t domid,
                    libxl_device_usb **dev,
                    const libxl_asyncop_how *ao_how)
                    LIBXL_EXTERNAL_CALLERS_ONLY;

struct libxl_device_usb {
     uint16_t protocol; /* AUTO, PV, HVM */
     uint16_t type; /* HOST; later can be emulated devices like tablet, 
disk, &c */
     uint32_t backend_domain_id; /* For PVUSB */
     uint64_t handle;  /* OUT: Unique (per domain) handle that must be 
used to remove a device */
     int
     union {
         struct {
             int hostbus, hostaddr, vendorid, productid;
         } host;
     };
};

             reply	other threads:[~2013-04-03 15:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-03 15:11 George Dunlap [this message]
2013-04-03 15:46 ` RFC: Proposed libxl USB hot-plug interface Ian Jackson
2013-04-03 16:04   ` George Dunlap
2013-04-03 16:11     ` Ian Jackson
2013-04-10 10:26 ` Ian Campbell

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=515C46A4.8060506@eu.citrix.com \
    --to=george.dunlap@eu.citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=marmarek@invisiblethingslab.com \
    --cc=roger.pau@citrix.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.