From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: How console data travel in Xen? Date: Thu, 30 Jun 2005 13:16:54 -0500 Message-ID: <42C43716.4020803@us.ibm.com> References: <5d7aca950506300841306bad7a@mail.gmail.com> <42C4190D.7000809@us.ibm.com> <5d7aca9505063010287ec8117a@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5d7aca9505063010287ec8117a@mail.gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: NAHieu Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org NAHieu wrote: >Anthony, thank you for a great detail explaination. These information >is really helpful to me. > > no problem :-) >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) > > Ok, so let's say you enter some keyboard data. Those keyboard actions are going to go to dom0. If you're typing at a console it's getting intercepted by some program that's push that keyboard data to Xend let's say. Xend takes that data and splits it up into CMSG_CONSOLE messages which it then passes through the previously described mechanism to domU. Then domU sees that data as input on a virtual serial device (the domU kernel's been hacked to use the serial device by default instead of the typical virtual terminals). Then when domU decides it wants to display that data back to the user, it sends it back to dom0 again through the previously described channel. Xend ends up getting those messages and assembles it into a string which it then displays back on the console. This is probably a bit clearer if you look at the VM-Tools source tree. Everything is pretty much confined to tools/vm-console.c and xenctld/console.c. Xend does pretty much the same thing but there's a bit more indirection involved. Regards, Anthony Liguori >Thank you a lot, >Hieu > > >