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/
Home Products Support Community News


Re: [Xen-devel] how to read value from xenstore inside kernel

To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Subject: Re: [Xen-devel] how to read value from xenstore inside kernel
From: Kuriakose Mathew <kmathew123@xxxxxxxxx>
Date: Tue, 25 Aug 2009 16:27:22 +0530
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 25 Aug 2009 03:59:48 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=xXaHYy7DYRa/zNWwLTb9Yr3UtKmGynspONjqdDR93NM=; b=LVJSUFq9ehqvS9S5N4l3YO3f8qvmNqIWChgtyTXBkRo1m/PTnquiyHEtg2aVoLqrx4 6O4Cww/RLmGsMM87RwzYPv+qnRGhSa0RJVRB46/AfnGm54ns6eBKZwCsDHAt12O29c8L /hLVCL1Lk/iZ25OBMIU9oudElBWAGkrN0tmiI=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=MeF8cc1ox7OeNUrRgMbWGJDp8lxHSZPFaYyRDboHr+M2bsX6gR0qPoeC/MMSfnL3gJ p0sugestBwXVkK2rTGudRLr2+3mC0yB99gl29yJSd2wJaXQW1mHd0U/Um8j/wS4CTTyw 6AKVFoCBq+6Vh2A1DWXNxO1+cY3zVUagIH/X0=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20090817182023.GA6144@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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <9e81bde0908162340h42011f5cn7606c962fda89da4@xxxxxxxxxxxxxx> <20090817143826.GA4551@xxxxxxxxxxxxxxxxxxx> <9e81bde0908171055q5504683cm19cb2c70e24dfb88@xxxxxxxxxxxxxx> <20090817182023.GA6144@xxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi ,

I have been trying to use to xenbus_read.

I added the below code in netback.c , static void net_tx_action(unsigned long unused) function.

char * test;
const char *nodename = "console";
test = xenbus_read(XBT_NIL, nodename, "limit", NULL);

It is compiling fine. But when the kernel is crashing at this point during runtime.
I expect to read the /local/domain/0/console/limit , which I am able to read from shell using
xenstore-read . Am I missing something ?


On Mon, Aug 17, 2009 at 11:50 PM, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> wrote:
On Mon, Aug 17, 2009 at 11:25:36PM +0530, Kuriakose Mathew wrote:
> Thanks for the response.
> But I want the value to be read in netback.c . I checked the
> drivers/xen/netback/xenbus.c
> and found some functions using xenbus_scanf . But couldn't find where these
> functions are getting called.

I recommend you get acquinted with 'cscope' and run under your linux directory this
command: 'make cscope' to create the cscope files. Then look for xenbus_scanf.

> Whether it will be possible to directly call xenbus_scanf directly in
> netback.c ? I want a value in xenstore to be read in some function in

Yes, if you have all of the #include files set right.

> netback.c.

Xen-devel mailing list