All of lore.kernel.org
 help / color / mirror / Atom feed
* consoleio_read in domU
@ 2006-02-08  9:02 nicowisamu
  0 siblings, 0 replies; 2+ messages in thread
From: nicowisamu @ 2006-02-08  9:02 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1320 bytes --]

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.
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 ?

[-- Attachment #1.2: Type: text/html, Size: 1574 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 2+ messages in thread
* RE: consoleio_read in domU
@ 2006-02-08 10:10 Ian Pratt
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Pratt @ 2006-02-08 10:10 UTC (permalink / raw)
  To: nicowisamu, xen-devel

 > 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 ?
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-02-08 10:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-08  9:02 consoleio_read in domU nicowisamu
  -- strict thread matches above, loose matches on Subject: below --
2006-02-08 10:10 Ian Pratt

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.