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] Some questions about Wrting XenStore Code!~~

To: "吴佳民" <wujiamin_tyut@xxxxxxx>
Subject: Re: [Xen-devel] Some questions about Wrting XenStore Code!~~
From: "Derek Murray" <Derek.Murray@xxxxxxxxxxxx>
Date: Fri, 4 Jul 2008 09:32:39 +0200
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 04 Jul 2008 00:34:16 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :sender:to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=tT4ibTbabZ0QU5NfDR1yswYtcb2nNsBfz9rvECKZd0w=; b=BBrXa3bhn9mENHa2Bpsx0co16sVEtBIwvG3VBdqRMigaHiB1jQm1j2Cei4KxGdKiNh FYEEXHnaev560U9FPFmiz7Cubs7P6fn4b69Nns6aj/qQ8APAdYInYW3pljRGmi064QVE mP+UORdPWKHdmOK6y8UYwgmo623ze9whrEjpI=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:sender:to:subject:cc:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:references:x-google-sender-auth; b=nE33lRNXjLnkwIV99sPfvxWXz3HNVkydjU1kwjjTm8MupvyVvtLou4GNncy64xL1/b CrB5Du/SI05j0Uv1Z6/PFI8gZ3AwrH8ROv31m2TlTMyjVkqp+oW/4c7JkdLYpQfMkmPU pAr/Z1mGAnzJYfR9DhPmNfzyUV2g4OLpJn0zQ=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <23702546.583191215131859204.JavaMail.coremail@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: <23702546.583191215131859204.JavaMail.coremail@xxxxxxxxxxxxxxxxxxx>
Reply-to: Derek.Murray@xxxxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

To access XenStore from a userspace process, you should use the
functions in libxs, as can be found in $XEN_ROOT/tools/xenstore/xs.h.
The contents of xsls.c in the same directory should give you an idea
of how to connect to and use the store - note that you do not need the
shared_info_t structure or any direct hypercalls.

Regards,

Derek Murray.

2008/7/4 吴佳民 <wujiamin_tyut@xxxxxxx>:
> Hi:
>     I am  now writing code about using XenStore to write some (keys, values)
> on Dom0.
>     my code is as follows:
>
> //filename: w_main.h
>
> #include "w_xenstore.h"
> //The "w_xenstore.h" is a header file I write myself
>
> #include <x86_mm.h>
>
> extern shared_info_t * shared_info;
>
> int main(void)
> {
>     /* Set up the XenStore driver */
>     xenstore_init(start_info);
>     /* Test the store */
>     xenstore_test();
>     /* Flush the console buffer */
>
>     return 0;
> }
>
> and I know that if I wanna use xenStore, I have to use shared_info_t *
> shared_info. When I compile the code, it tells me that shared_info is not
> stated before using.
>
> my question is :
> (1)
> How to get a pointer to shared_info_t structure in my program (running in
> Userspace)?
>
> (2) I can not include ":hypercall-x86_32.h" and "x86_mm.h" , and I really
> can not find these two files on my machine.What is the problem?
>
> Thanks a lot!
>
>
> Danius Wu
> ================================================================
>
>
>
> ________________________________
> 350万起 独栋山墅
> _______________________________________________
> 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
<Prev in Thread] Current Thread [Next in Thread>