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] Re: hvmloader/xenbus.c: How to modify or add a key-value

To: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: hvmloader/xenbus.c: How to modify or add a key-value pair in xenstore
From: Bei Guan <gbtju85@xxxxxxxxx>
Date: Wed, 17 Aug 2011 00:42:24 +0800
Cc: Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>
Delivery-date: Tue, 16 Aug 2011 09:43:31 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=jFlJX873JfrZcTQXv2O48pZlM3kMtEhsxJ6yG9inJis=; b=xomA1wBCE5fpu2P99C48crKFn2lSLFXxCfDLtwEfubfbcmrL1sDnE5YWR3jaJmbPdq AewCqRY3KYeGdAIDY4k1azjReeQDGRP+BdYHFeoZ2pdbeIA2nFlykAZahUa2WjESgjFY kl+8u3TXGCVEmN2bNq9yncQipRbGONxdY7ihI=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1313509054.5010.137.camel@xxxxxxxxxxxxxxxxxxxxxx>
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: <CAEQjb-RKsd0zPrb7g20CgZ3YWogerWQY0u96rKDRwMMAbUDKrQ@xxxxxxxxxxxxxx> <CAEQjb-S01mx1vZqyzfRhrm41__nMbYG2so+DBuwQh6j8htc2zw@xxxxxxxxxxxxxx> <20110815094435.GF11708@xxxxxxxxxxxxxxxxxxxxx> <CAEQjb-SLu4APzJ-NbGcGztMBJ96u4rhjv+zFvvoNtZFqXentVQ@xxxxxxxxxxxxxx> <1313486236.5010.33.camel@xxxxxxxxxxxxxxxxxxxxxx> <CAEQjb-Rcw9ZCzhV7PznW-sCHOzPf2en06dPNzuVU6jnihCc+4Q@xxxxxxxxxxxxxx> <1313509054.5010.137.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx


2011/8/16 Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
(please do not top post)

On Tue, 2011-08-16 at 16:32 +0100, Bei Guan wrote:
> Many thanks to all of you.
> I see there are some functions in mini-os/xenbus/xenbus.c, such as
> xenbus_write() and xenbus_rm(). All of them seem to change the keys
> and values in xenstore. I have tried these functions and found that
> they have no effect on the keys and values in xenstore.

Tried in the context of mini-os or tried by ripping them out and into
hvmloader?
I tried in the context of mini-os.
I use the test function in mini-os/xenbus/xenbus.c, such as do_write_test("device/vif/0/flibble", "flobble"). Also I comment out the do_rm_test("device/vif/0/flibble").
When the mini-os starts to run, I use the xenstore-ls to see the keys and values, but I cannot find the key /local/domain/<domId>/device/vif/0/flibble and its value.


> �So, do these functions can really work?

mini-os's frontend drivers presumably use them so I'd expect so.
Yes, I saw the frontend drivers use these functions. But, it seems all the keys are created by dom0 or other tools instead of mini-os itself.�
When I change the key name in the front driver that is going to be create by method xenbus_printf(), such as change from
� � err = xenbus_printf(xbt, nodename, "ring-ref","%u",�dev->ring_ref);
to�
� � err = xenbus_printf(xbt, nodename, "ring-ref-0","%u",�dev->ring_ref);
I cannot find the ring-ref-0 in xenstore, when mini-os is running.


> �What special things need I to do to make them work?

Which specific path are you trying to write?
I am not sure if the domain can operate any keys and�values�in /local/domain/<Id of this domain>/, such as change "name" to another one, add a new key-value /local/domain/<Id of this domain>/new-key = new-value.

Thanks,
Bei Gua

>
>
>
>
> Thanks,
> Bei Guan
>
>
> 2011/8/16 Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
> � � � � On Mon, 2011-08-15 at 16:20 +0100, Bei Guan wrote:
> � � � � > Maybe the VM doesn't have the permission to write its own
> � � � � key in
> � � � � > Xenstore.
>
>
> � � � � It is quite common for keys in xenstore to be ro for the guest
> � � � � (only the
> � � � � backend or toolstack domain can write to them).
>
> � � � � Ian.
>
>
>



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