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

To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] how to read value from xenstore inside kernel
From: Kuriakose Mathew <kmathew123@xxxxxxxxx>
Date: Mon, 17 Aug 2009 23:25:36 +0530
Cc:
Delivery-date: Mon, 17 Aug 2009 10:56:01 -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:content-type; bh=oamruc9uy2Jk7qeMwZPBa2c97WxGLZgCVmXWlwPwLew=; b=uP98Bog9QPLZqx3Nryj2LrfiaWK72IybdxjgeOTkM4ewGticPeGQSCYpd1RqgsNB5L IQbxC5544zM5Ivnk1rnKayxjvZX+UXZTUvn4ql3ZNJPF72qLMsv/koGFYJ1P8FpVxqVO 9rM0hagLAGzi+F797t73xfrTDgG0l+aYOpOPM=
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 :content-type; b=AVz0rG3ju2s7cp/ymsYc8YMnUc5RE4Ygv0Cm9wCqMIPcpPn5k1eVGb00RQvhXIKE7J DXOpNMfyEilH38wEwEGvUJOYRLakXRuIFvQ8HgDmLS06Zyvi+NDnlIvGjJlzXGhLzppW huJpJDpKgzdAzw75TG6vUZwPAjnzE5VuDQn8Y=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20090817143826.GA4551@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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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.
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 netback.c.

Please help.
-Mathew


On Mon, Aug 17, 2009 at 8:08 PM, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> wrote:
On Mon, Aug 17, 2009 at 12:10:21PM +0530, Kuriakose Mathew wrote:
> Can someone please point me to a code( or help me to find some code)where a
> value corresponding to a key is read from Xenstore inside the kernel . My
> requirement is to read a xenstore value from netback.c .

In drivers/xen/blkback/xenbus.c, the function backend_changed exclusivy job is
to read those values. Here is an example:

278         err = xenbus_scanf(XBT_NIL, dev->nodename, "physical-device", "%x:%x",
279                            &major, &minor);

I would recommend you get a copy of "Understanding Xen" to understand how
XenStore "transfers" the data from one domain to another.

>
> Thanks
> Mathew

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


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