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 to read value from xenstore inside kernel

> When I am using
>   char * test;
>   const char *nodename = "vif/2/0";
>   test = xenbus_read(XBT_NIL, nodename, "mac", NULL);
> 
> in netback .c ,I am getting this error when the kernel is rebooted.
> 
> guest1 BUG: scheduling while atomic: xenwatch/0x00000100/13
> 

That will be because the xenbus_read involves a wait of some sort, and
you can't do that in that sort of function.

Basically the rx and tx and other hardware event handlers need to
execute as fast as possible, which precludes any waiting for xenbus
responses to arrive.

Read your value at startup, or put a watch in at startup and read it
when it changes.

James

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