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] consoleio_read in domU

To: "nicowisamu" <nicowisamu@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] consoleio_read in domU
From: "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>
Date: Wed, 8 Feb 2006 10:10:34 -0000
Delivery-date: Wed, 08 Feb 2006 10:21:32 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcYsjo9miVr9+El9QvSWxplBCs3fHwACOnXQ
Thread-topic: [Xen-devel] consoleio_read in domU
 > Hello,
> I have ported a kernel named toppers on xen as domU using 
> mini-os libraries. 
> This OS use serial link for display and input. 
> For printing messages I use the hypercall console_io with the 
> consolio_write parameter.
> For reading the console input I wanted to use the same 
> hypercall with consolio_read parameter.

That's not really inteneded to be an option for guests other than domain
0 -- you're supposed to use the 'proper' console mechanism using the
ring buffer.

Getting the ring buffer mechanism going would certainly be the best way
of proceeding. Alternatively, I guess you could hack your version of xen
to hand the serial console off to another guest.

Ian

> But I don't well understand how console sharing works on xen. 
> Because, In order to call this function I need first an event 
> from event channel. So, on initializing, I bind VIRQ_CONSOLE 
> with my handler and then I use the hypercall to get the 
> message on my buffer. But the handler is never called. How 
> should I proceed ?
> 
> my initialize function where I have replaced the serial 
> initialize by a bind_virq :
> 
> void
> serial_initialize(VP_INT portid)
> {
> static char buf[]="Initializing serial interface";
>     static char buf2[]=" OK\n";
> (void)HYPERVISOR_console_io(CONSOLEIO_write,strlen(buf), buf);
>     bind_virq(VIRQ_CONSOLE, &serial_handler);
>     (void)HYPERVISOR_console_io(CONSOLEIO_write,strlen(buf2), buf2); }
> 
> my handler which prints something if it is called :
> 
> void
> serial_handler(void)
> {
>     //hw_serial_handler();
>     static char buf[]="character received";
>     (void)HYPERVISOR_console_io(CONSOLEIO_write,strlen(buf), buf); }
> 
> 
> 
> could someone help me please ?
> 
> 

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

<Prev in Thread] Current Thread [Next in Thread>