All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Scott <dave.scott@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: ian.jackson@eu.citrix.com, David Scott <dave.scott@citrix.com>,
	wei.liu2@citrix.com, ian.campbell@citrix.com,
	stefano.stabellini@eu.citrix.com
Subject: [PATCH v2 1/6] libxl: add a list of abstract 'channels' to the domain config
Date: Mon, 16 Jun 2014 10:49:50 +0100	[thread overview]
Message-ID: <1402912195-24732-2-git-send-email-dave.scott@citrix.com> (raw)
In-Reply-To: <1402912195-24732-1-git-send-email-dave.scott@citrix.com>

A 'channel' is a low-bandwidth private communication channel that
resembles a physical serial port. Example uses include:

  * providing initial VM configuration without having to use the
    network
  * signalling a guest agent

Every channel has a string 'name' which the VM can use to find
the appropriate handler. Each channel has an implementation 'type'
which currently includes:

  * NONE: reads will block, writes will be thrown away
  * PTY: the I/O surfaces as a pty in the backend domain
  * PATH: writes are appended to a log file in the backend domain
  * SOCKET: a listening Unix domain socket accepts a connection in
    the backend domain and proxies

Signed-off-by: David Scott <dave.scott@citrix.com>
---
 tools/libxl/libxl_types.idl |   21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
index 52f1aa9..5671d86 100644
--- a/tools/libxl/libxl_types.idl
+++ b/tools/libxl/libxl_types.idl
@@ -51,6 +51,17 @@ libxl_domain_type = Enumeration("domain_type", [
     (2, "PV"),
     ], init_val = -1)
 
+libxl_channel_type = Enumeration("channel_type", [
+    # Connected to nothing:
+    (0, "NONE"),
+    # Connect to a pty in the backend domain:
+    (1, "PTY"),
+    # Spool output to a file in the backend domain:
+    (2, "PATH"),
+    # Listen on a Unix domain socket in the backend domain:
+    (3, "SOCKET"),
+    ])
+
 libxl_device_model_version = Enumeration("device_model_version", [
     (0, "UNKNOWN"),
     (1, "QEMU_XEN_TRADITIONAL"), # Historical qemu-xen device model (qemu-dm)
@@ -457,6 +468,15 @@ libxl_device_vtpm = Struct("device_vtpm", [
     ("uuid",             libxl_uuid),
 ])
 
+libxl_device_channel = Struct("device_channel", [
+    ("backend_domid", libxl_domid),
+    ("backend_domname", string),
+    ("devid", libxl_devid),
+    ("name", string),
+    ("type", libxl_channel_type),
+    ("path", string),
+])
+
 libxl_domain_config = Struct("domain_config", [
     ("c_info", libxl_domain_create_info),
     ("b_info", libxl_domain_build_info),
@@ -467,6 +487,7 @@ libxl_domain_config = Struct("domain_config", [
     ("vfbs", Array(libxl_device_vfb, "num_vfbs")),
     ("vkbs", Array(libxl_device_vkb, "num_vkbs")),
     ("vtpms", Array(libxl_device_vtpm, "num_vtpms")),
+    ("channels", Array(libxl_device_channel, "num_channels")),
 
     ("on_poweroff", libxl_action_on_shutdown),
     ("on_reboot", libxl_action_on_shutdown),
-- 
1.7.10.4

  reply	other threads:[~2014-06-16  9:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-16  9:49 [PATCH v2] implement libvirt-like 'channels' via PV consoles David Scott
2014-06-16  9:49 ` David Scott [this message]
2014-06-18 13:27   ` [PATCH v2 1/6] libxl: add a list of abstract 'channels' to the domain config Ian Campbell
2014-06-18 14:05     ` Dave Scott
2014-06-18 14:38       ` Ian Campbell
2014-06-16  9:49 ` [PATCH v2 2/6] xl: add support for channels David Scott
2014-06-16  9:49 ` [PATCH v2 3/6] libxl: implement channels via PV console rings David Scott
2014-06-18 13:31   ` Ian Campbell
2014-06-16  9:49 ` [PATCH v2 4/6] libxl: spawn a qemu to implement channels David Scott
2014-06-18 13:32   ` Ian Campbell
2014-06-16  9:49 ` [PATCH v2 5/6] Add a section in xl.cfg(5) describing 'channels' David Scott
2014-06-18 13:38   ` Ian Campbell
2014-06-16  9:49 ` [PATCH v2 6/6] Add a general description of the channel mechanism to docs/misc/ David Scott
2014-06-18 13:41   ` Ian Campbell
2014-06-18 14:37     ` Dave Scott
2014-06-18 14:43       ` Ian Campbell
2014-06-18 15:00         ` Dave Scott
2014-06-16 13:34 ` [PATCH v2] implement libvirt-like 'channels' via PV consoles Konrad Rzeszutek Wilk
2014-06-16 13:49   ` Dave Scott
2014-06-16 13:52     ` Konrad Rzeszutek Wilk
2014-06-18 13:43       ` 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=1402912195-24732-2-git-send-email-dave.scott@citrix.com \
    --to=dave.scott@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.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.