WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] How console data travel in Xen?

To: Anthony Liguori <aliguori@xxxxxxxxxx>
Subject: Re: [Xen-devel] How console data travel in Xen?
From: NAHieu <nahieu@xxxxxxxxx>
Date: Fri, 1 Jul 2005 02:28:22 +0900
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 30 Jun 2005 17:27:17 +0000
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=C52+APYEu4y3BflnjdYlPTXF8p93wbVQ1s3FUWSjGfirO+xjwbV1MVSGnzU53dPMVWsTk8WZRuEIqn3kICeWWiZufepXBOCovX9zleYKRMi1mmA/Dj2oRJa1cp709IBf+lOx/rLyxqoN9dMpE8zRK8BnecArR8gGD2YZ86n4qgM=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <42C4190D.7000809@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <5d7aca950506300841306bad7a@xxxxxxxxxxxxxx> <42C4190D.7000809@xxxxxxxxxx>
Reply-to: NAHieu <nahieu@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On 7/1/05, Anthony Liguori <aliguori@xxxxxxxxxx> wrote:
> NAHieu wrote:
> 
> >Hello,
> >
> >I am trying to investigate in detail how console data go thru the Xen
> >system. Suppose that I am running a domainU, when I type at the
> >domainU console (I connect to the console with xencons or ssh), how
> >data (from keyboard in this case) travel from low level (hardware) to
> >Xen, then to dom0, then to domU?
> >
> >
> There exists a well-known event channel and shared memory page between
> each dom0 and domU which the control tools are responsible for setting
> up (in Xend, that's xcs--in VM-Tools, that's xenctld).  The shared
> memory page is defined by the shared_info_frame which is queriable as
> part of getdomaininfo().  The event channel is chosen by the control
> tools and is almost always 1.
> 
> The event channel and shared memory page make up the control channel.
> The shared memory page is used as a ring queue for messages (see
> /usr/include/xen/io/domain_controller.h) and the event channel is a
> notification message to say when a new message has arrived.
> 
> One of the message types is CMSG_CONSOLE.  It has one message subtype
> CMSG_CONSOLE_DATA.  Console data (input and output) is passed in 60 byte
> chunks using this message type between dom0 and domU.  This is handled
> at drivers/xen/console/console.c in domU (in the kernel tree) and in
> tools/xcs/*.c in dom0 (or xenctld/console.c in VM-Tools).  In VM-Tools,
> the console messages are just put into a queue until a file (usually a
> pty) is associated with the device in which case everything is
> dumped/read from the file.
> 
> The Xend/xcs architecture is a bit more complex.  xcs forwards all
> messages over two sockets to Xend.  Xend then dispatches these messages
> internally.  The messages are then read/written to a socket.  The stuff
> that's unique to the console is mostly handled in
> tools/python/xen/xend/server/console.py

Anthony, thank you for a great detail explaination. These information
is really helpful to me.

But still few questions stand: how do console data go from HW to Xen,
then to dom0? (the above explaination is only about sessions between
dom0 and domU)

Thank you a lot,
Hieu

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel