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] Unable to include xen/sched.h

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] Unable to include xen/sched.h
From: "ashutosh mehra" <ashutosh.xen@xxxxxxxxx>
Date: Wed, 14 Nov 2007 18:08:09 +0530
Cc: Atsushi SAKAI <sakaia@xxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>
Delivery-date: Wed, 14 Nov 2007 04:38:48 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=8lKggG80hXp9l++D0J22L9tCuLAG7zMLlW9NpwhroX4=; b=jAIvX9d9WqHWtRI0//nH0DSNrdB77ysPBclyKWKalu5dedKeXsOwEhSK2sdef4HnurbXkcEmK4k1A/r8+/YHx3CNeE6rnRt2ggJHVy/r5b69Jo5snoxtxV1+fadu7HNv7AU/VAd4Ia+A+O3ZhnlzRoQNP5TSMdALJ47W/s4IJ00=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=AkLvftYT0hzafqB1rMTiYnoXkuTWyewKtfRwfOjyp7TevSbZzv7zNn858PLOXUPcJmJLfYscIuP9htsFpMKeYODwuLKJOIWBZUjXcbGEIryLMzX0ET2f3O+ZWoLlungldprDrzhQg/DwJy//NKtzjO8VH7kShgG2TW5D9KtLYas=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C3608B66.186FB%Keir.Fraser@xxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <bb4253730711140321g237ae37x54a9d96039be4aa2@xxxxxxxxxxxxxx> <C3608B66.186FB%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,
I tried including sysctl.h using
#ifndef __XEN_TOOLS__
#define __XEN_TOOLS__ 1
#endif
#include <xen/interface/sysctl.h>

 but on compilation I get following errors:

In file included from /usr/local/src/xen- 3.1.0-src/linux-2.6.18-xen/include/xen/interface/sysctl.h:35,
                 from /home/ashu/Desktop/xenmodule/mymodule.c:19:
/usr/local/src/xen-3.1.0-src/linux-2.6.18-xen/include/xen/interface/domctl.h:40: error: expected specifier-qualifier-list before XEN_GUEST_HANDLE_64
/usr/local/src/xen-3.1.0-src/linux-2.6.18-xen/include/xen/interface/domctl.h:95: error: expected specifier-qualifier-list before uint64_aligned_t
/usr/local/src/xen-3.1.0-src/linux-2.6.18-xen/include/xen/interface/domctl.h:112: error: expected specifier-qualifier-list before uint64_aligned_t
/usr/local/src/xen-3.1.0-src/linux-2.6.18-xen/include/xen/interface/domctl.h:138: error: expected specifier-qualifier-list before uint64_aligned_t
/usr/local/src/xen-3.1.0-src/linux-2.6.18-xen/include/xen/interface/domctl.h:150: error: expected specifier-qualifier-list before uint64_aligned_t
/usr/local/src/xen-3.1.0-src/linux-2.6.18-xen/include/xen/interface/domctl.h:226: error: expected specifier-qualifier-list before XEN_GUEST_HANDLE_64
/usr/local/src/xen-3.1.0-src/linux-2.6.18-xen/include/xen/interface/domctl.h:237: error: expected specifier-qualifier-list before uint64_aligned_t
/usr/local/src/xen-3.1.0-src/linux-2.6.18-xen/include/xen/interface/domctl.h:247: error: expected specifier-qualifier-list before XEN_GUEST_HANDLE_64
/usr/local/src/xen-3.1.0-src/linux-2.6.18-xen/include/xen/interface/domctl.h:261: error: expected specifier-qualifier-list before uint64_aligned_t
/usr/local/src/xen-3.1.0-src/linux-2.6.18-xen/include/xen/interface/domctl.h:299: error: expected specifier-qualifier-list before uint64_aligned_t
/usr/local/src/xen-3.1.0-src/linux-2.6.18-xen/include/xen/interface/domctl.h:342: error: expected specifier-qualifier-list before uint64_aligned_t
/usr/local/src/xen-3.1.0-src/linux-2.6.18-xen/include/xen/interface/domctl.h:362: error: expected specifier-qualifier-list before uint64_aligned_t
/usr/local/src/xen-3.1.0-src/linux-2.6.18-xen/include/xen/interface/domctl.h:374: error: expected specifier-qualifier-list before uint64_aligned_t
/usr/local/src/xen-3.1.0-src/linux-2.6.18-xen/include/xen/interface/domctl.h:397: error: expected specifier-qualifier-list before XEN_GUEST_HANDLE_64
In file included from /home/ashu/Desktop/xenmodule/mymodule.c:19:
/usr/local/src/xen-3.1.0-src/linux-2.6.18-xen/include/xen/interface/sysctl.h:46: error: expected specifier-qualifier-list before XEN_GUEST_HANDLE_64
/usr/local/src/xen-3.1.0-src/linux-2.6.18-xen/include/xen/interface/sysctl.h:68: error: expected specifier-qualifier-list before uint64_aligned_t
/usr/local/src/xen-3.1.0-src/linux-2.6.18-xen/include/xen/interface/sysctl.h:84: error: expected specifier-qualifier-list before uint64_aligned_t
/usr/local/src/xen-3.1.0-src/linux-2.6.18-xen/include/xen/interface/sysctl.h:124: error: expected specifier-qualifier-list before XEN_GUEST_HANDLE_64
/usr/local/src/xen-3.1.0-src/linux-2.6.18-xen/include/xen/interface/sysctl.h:136: error: expected specifier-qualifier-list before XEN_GUEST_HANDLE_64
/usr/local/src/xen-3.1.0-src/linux-2.6.18-xen/include/xen/interface/sysctl.h:149: error: expected specifier-qualifier-list before XEN_GUEST_HANDLE_64

Any solutions for this problem?

One more question...
How to add a watch on entire tree? I tried using register_xenbus_watch() to add a watch on "local/domain" but it is not working.
And...
what does this function do?
char **xenbus_directory(struct xenbus_transaction t,
            const char *dir, const char *node, unsigned int *num);

Thanks,
Ashutosh


On Nov 14, 2007 4:54 PM, Keir Fraser < Keir.Fraser@xxxxxxxxxxxx> wrote:



On 14/11/07 11:21, "ashutosh mehra" <ashutosh.xen@xxxxxxxxx> wrote:

I tried #include<xen/interface/sysctl.h> but I get an error: #error "domctl operations are intended for use by node control tools only"

Keir, how do I add a watch on an entire path, e.g. /local/domain/? More importantly, how can I get the list of domains/domainIds of the currently running domains in a module running in dom0 kernel?? Please help, I'm looking for an answer to this since quite a few days!

You can add a watch on that entire path from dom0, no problem. As for getting a list of all domains, you can only do that with sysctl. If you really need it then #define __XEN_TOOLS__ before including sysctl.h.

 -- Keir


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