From: David Scott Subject: [PATCH v2 6/6] Add a general description of the channel mechanism to docs/misc/ Date: Mon, 16 Jun 2014 10:49:55 +0100 Message-ID: <1402912195-24732-7-git-send-email-dave.scott@citrix.com> References: <1402912195-24732-1-git-send-email-dave.scott@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WwTYR-0006oo-Ks for xen-devel@lists.xenproject.org; Mon, 16 Jun 2014 09:50:19 +0000 In-Reply-To: <1402912195-24732-1-git-send-email-dave.scott@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: ian.jackson@eu.citrix.com, David Scott , wei.liu2@citrix.com, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org Signed-off-by: David Scott --- docs/misc/channel.txt | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 docs/misc/channel.txt diff --git a/docs/misc/channel.txt b/docs/misc/channel.txt new file mode 100644 index 0000000..b5ab385 --- /dev/null +++ b/docs/misc/channel.txt @@ -0,0 +1,49 @@ +Xen PV Channels +------------------------------------------------------------------------ + David Scott + dave.scott@citrix.com + + +A channel is a low-bandwidth private byte stream similar to a serial +link. Typical uses of channels are + + 1. to provide initial configuration information to a VM on boot + (example use: CloudStack's cloud-early-config service) + 2. to signal/query an in-guest agent + (example use: oVirt's guest agent) + +Channels are similar to virtio-serial devices, and are intended to be +used in the implementation of libvirt s when running on Xen. + +Note: if an application requires a high-bandwidth link then it should use +vchan instead. + +From the frontend's point of view, a channel is a PV console with a +name, a where the name can be used to locate the correct device. The +name is stored in the frontend xenstore directory: + + /local/domain/$DOMID/device/console/$DEVID/name + +The frontend can check for this key when the console is hotplugged, +and handle the device appropriately. For example the frontend could +spawn a guest agent when a channel with a well-known name is created, +and still spawn regular getty processes when a normal console is created. + +The backend is configured by 2 xenstore keys: + + type = (NONE | FILE | PTY | SOCKET | ... ) + path = + +In the default implementation where the backend is run in the toolstack +domain, the qemu "chardev" mechanism is used. This implementation +interprets the configuration as follows: + + type = NONE: the backend will be connected to /dev/null + type = FILE: the channel will be read the the output appended + to the file given by 'path' + type = PTY: the backend will connect to a PTY like a regular console + type = SOCKET: the backend will accept a connection on the Unix + domain socket given by 'path' and proxy data to and from the device. + +If the implementation is in another domain (for example via a Mirage +console backend) then the behaviour will be defined by this other domain. -- 1.7.10.4