* Mini-OS and Xenstore
@ 2008-08-05 4:00 Julian Munster
2008-08-05 8:33 ` braham othmen
2008-08-05 9:51 ` Samuel Thibault
0 siblings, 2 replies; 8+ messages in thread
From: Julian Munster @ 2008-08-05 4:00 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 232 bytes --]
Hi,
I'm new to xen and I'm trying to write to the xenstore from within the
mini-os, but I always get the same error. I was wondering if anyone could
help me out.
The error:
BUG at xenbus/xenbus.c:343
Do_exit called!
Thanks
Julian
[-- Attachment #1.2: Type: text/html, Size: 290 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] 8+ messages in thread
* Re: Mini-OS and Xenstore
2008-08-05 4:00 Mini-OS and Xenstore Julian Munster
@ 2008-08-05 8:33 ` braham othmen
2008-08-05 9:51 ` Samuel Thibault
2008-08-05 9:51 ` Samuel Thibault
1 sibling, 1 reply; 8+ messages in thread
From: braham othmen @ 2008-08-05 8:33 UTC (permalink / raw)
To: Julian Munster; +Cc: xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 927 bytes --]
Hi,
I'm new too. I tried to write to xenstore using xenbus_printf() by including
xenbus.h to the part from which i wanted that it write to xenstore. But
only, the try that succeed is from netfront.c which in fact implements the
xenbus_printf() function, and also by using directly xenbus_write() wich is
implemented in xenbus.c. From other part of the code even by including
xenbus.h, it give me a compilation error by using xenbus_write()...!!
best regard
Braham Othmen
2008/8/5 Julian Munster <jmuenster@gmail.com>
> Hi,
> I'm new to xen and I'm trying to write to the xenstore from within the
> mini-os, but I always get the same error. I was wondering if anyone could
> help me out.
>
> The error:
> BUG at xenbus/xenbus.c:343
> Do_exit called!
>
> Thanks
> Julian
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
>
[-- Attachment #1.2: Type: text/html, Size: 1724 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] 8+ messages in thread
* Re: Mini-OS and Xenstore
2008-08-05 4:00 Mini-OS and Xenstore Julian Munster
2008-08-05 8:33 ` braham othmen
@ 2008-08-05 9:51 ` Samuel Thibault
1 sibling, 0 replies; 8+ messages in thread
From: Samuel Thibault @ 2008-08-05 9:51 UTC (permalink / raw)
To: Julian Munster; +Cc: xen-devel
Julian Munster, le Tue 05 Aug 2008 16:00:04 +1200, a écrit :
> I'm new to xen and I'm trying to write to the xenstore from within the mini-os,
> but I always get the same error. I was wondering if anyone could help me out.
>
> The error:
> BUG at xenbus/xenbus.c:343
> Do_exit called!
How odd...
How are you calling it?
Samuel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Mini-OS and Xenstore
2008-08-05 8:33 ` braham othmen
@ 2008-08-05 9:51 ` Samuel Thibault
2008-08-05 10:29 ` braham othmen
0 siblings, 1 reply; 8+ messages in thread
From: Samuel Thibault @ 2008-08-05 9:51 UTC (permalink / raw)
To: braham othmen; +Cc: xen-devel, Julian Munster
braham othmen, le Tue 05 Aug 2008 10:33:12 +0200, a écrit :
> From other part of the code even by including
> xenbus.h, it give me a compilation error by using xenbus_write()...!!
Which is?
Samuel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Mini-OS and Xenstore
2008-08-05 9:51 ` Samuel Thibault
@ 2008-08-05 10:29 ` braham othmen
2008-08-05 10:37 ` Samuel Thibault
0 siblings, 1 reply; 8+ messages in thread
From: braham othmen @ 2008-08-05 10:29 UTC (permalink / raw)
To: Samuel Thibault, braham othmen, Julian Munster, xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 955 bytes --]
Hi,
The error was when i boot the virtual machine with 'xen create
domain_comfig', the mini-os machine don't start and when i fallow the result
from its console by 'xen create domain_comfig -c' , the total machine exited
when it arrive i think to this code
xenbus_write(XBT_NIL,"/local/example","val_example");
which is included in events.c and adding also the library '#include
<xenbus.h>'
I tried several combination of the xenstore path like:
xenbus_write(XBT_NIL,"local/example","val_example");
xenbus_write(XBT_NIL,"example","val_example");
but I still have the same problem.
Thanks for help.
Best regards
Braham Othmen
2008/8/5 Samuel Thibault <samuel.thibault@eu.citrix.com>
> braham othmen, le Tue 05 Aug 2008 10:33:12 +0200, a écrit :
> > From other part of the code even by including
> > xenbus.h, it give me a compilation error by using xenbus_write()...!!
>
> Which is?
>
> Samuel
>
[-- Attachment #1.2: Type: text/html, Size: 2193 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] 8+ messages in thread
* Re: Mini-OS and Xenstore
2008-08-05 10:29 ` braham othmen
@ 2008-08-05 10:37 ` Samuel Thibault
2008-08-05 15:20 ` braham othmen
0 siblings, 1 reply; 8+ messages in thread
From: Samuel Thibault @ 2008-08-05 10:37 UTC (permalink / raw)
To: braham othmen; +Cc: xen-devel, Julian Munster
braham othmen, le Tue 05 Aug 2008 12:29:17 +0200, a écrit :
> this code
> xenbus_write(XBT_NIL,"/local/example","val_example");
> which is included in events.c
Where did you add that code in events.c? Take care that the xenbus
stuff may not be initialized at that point... See the initialization
steps in kernel.c's start_kernel.
Samuel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Mini-OS and Xenstore
2008-08-05 10:37 ` Samuel Thibault
@ 2008-08-05 15:20 ` braham othmen
2008-08-05 15:35 ` Samuel Thibault
0 siblings, 1 reply; 8+ messages in thread
From: braham othmen @ 2008-08-05 15:20 UTC (permalink / raw)
To: Samuel Thibault, braham othmen, Julian Munster, xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 2607 bytes --]
Thank you,
I now understand why it wouldn't work because of the order of
initialization action in start_kernel() function. I make some permitting
and like it used to do, it compiles correctly but the virtual machine don't
start at all. I think that the order must respect some chronologies, did any
one know some document explaining more about that?
/* Set up events. */
init_events();
/* ENABLE EVENT DELIVERY. This is disabled at start of day. */
__sti();
arch_print_info();
setup_xen_features();
/* Init memory management. */
init_mm();
/* Init time and timers. */
init_time();
/* Init grant tables */
init_gnttab();
/* Init scheduler. */
init_sched();
/* Init XenBus */
init_xenbus();
/* Init the console driver. */
init_console();
/* Call (possibly overridden) app_main() */
I write this example for those who want to write to xenstore from Mini-OS, I
included in periodic_thread of the kernel.c. the value are updated
peridicaly. It depends also on the activity of virtual machine. But I want
if there a possibility to write
to any part of xenstore like the third case ??:
xenbus_write(XBT_NIL,"/local/count_example3",buf);
after loading the virtual machine, i did not found what i wrote.
thanks a lot,
static void periodic_thread(void *p)
{
struct timeval tv;
unsigned int count = 0;
char * buf;
printk("Periodic thread started.\n");
for(;;)
{
//########### counter ###########
count++;
sprintf(buf, "%u", count);
/* write to /local/domain/number_of_domain */
xenbus_write(XBT_NIL,"count_example1",buf);
/* write to /local/domain/number_of_domain/domain */
xenbus_write(XBT_NIL,"domain/count_example2",buf);
/* do not write any thing !! and do not invoke error !!!!! */
xenbus_write(XBT_NIL,"/local/count_example3",buf);
//######### end counter ##########
gettimeofday(&tv);
printk("T(s=%ld us=%ld)\n", tv.tv_sec, tv.tv_usec);
sleep(1000);
}
}
best regards
Braham Othmen
2008/8/5 Samuel Thibault <samuel.thibault@eu.citrix.com>
> braham othmen, le Tue 05 Aug 2008 12:29:17 +0200, a écrit :
> > this code
> > xenbus_write(XBT_NIL,"/local/example","val_example");
> > which is included in events.c
>
> Where did you add that code in events.c? Take care that the xenbus
> stuff may not be initialized at that point... See the initialization
> steps in kernel.c's start_kernel.
>
> Samuel
>
[-- Attachment #1.2: Type: text/html, Size: 4552 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] 8+ messages in thread
* Re: Mini-OS and Xenstore
2008-08-05 15:20 ` braham othmen
@ 2008-08-05 15:35 ` Samuel Thibault
0 siblings, 0 replies; 8+ messages in thread
From: Samuel Thibault @ 2008-08-05 15:35 UTC (permalink / raw)
To: braham othmen; +Cc: xen-devel, Julian Munster
braham othmen, le Tue 05 Aug 2008 17:20:33 +0200, a écrit :
> I make some permitting
So you just moved init_console() to the end, right? Why so?
Initializing the console lately prevents you from getting debugging
messages... You may want to enable the xen hypervisor emergency console
by turning verbose to y in xen/Rules.mk, and read from the serial port
of your box.
> it compiles correctly but the virtual machine don't start at all.
Possibly because of something that happens before the console gets
initialized.
> I think that the order must respect some chronologies,
Things depend on each other of course, that's not particular to mini-os.
For instance you need events first since basically any Xen stuff depends
on it, etc.
> But I want if there a
> possibility to write
> to any part of xenstore like the third case ??: xenbus_write(XBT_NIL,"/
> local/count_example3",buf);
> after loading the virtual machine, i did not found what i wrote.
Domains aren't allowed to write outside their tree. If you want to allow
them, give them permissions from dom0 thanks to xenstore-chmod.
Samuel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-08-05 15:35 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-05 4:00 Mini-OS and Xenstore Julian Munster
2008-08-05 8:33 ` braham othmen
2008-08-05 9:51 ` Samuel Thibault
2008-08-05 10:29 ` braham othmen
2008-08-05 10:37 ` Samuel Thibault
2008-08-05 15:20 ` braham othmen
2008-08-05 15:35 ` Samuel Thibault
2008-08-05 9:51 ` Samuel Thibault
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.