[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] change dom0 headers path



Fairly obviously, we need to clean up the hard-coded "linux" names used
in includes. This is the first step in a number of changes around
letting dom0 build on something other than Linux.

What are the plans for these headers when the Linux kernel lives in some
place other than the xen tree itself? We'd like to be able to share the
structure definitions, but our ioctl values will differ from Linux's...

regards,
john

# HG changeset patch
# User john.levon@xxxxxxx
# Node ID 0261b8ddaa8ae466b5cb7e5732fabc1fd25bc73c
# Parent  72f9c751d3ea1f17ff513cd7fc2cbe671a9af7c9
Put dom0 headers used by the tools under xen/dom0/ instead of xen/linux/.

Signed-off-by: John Levon <john.levon@xxxxxxx>

diff -r 72f9c751d3ea -r 0261b8ddaa8a tools/Rules.mk
--- a/tools/Rules.mk    Wed Apr 19 18:32:20 2006 +0100
+++ b/tools/Rules.mk    Wed Apr 19 11:37:30 2006 -0700
@@ -23,15 +23,22 @@
 %.o: %.cc
        $(CC) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
 
-.PHONY: mk-symlinks
-mk-symlinks: LINUX_ROOT=$(XEN_ROOT)/linux-2.6-xen-sparse
-mk-symlinks:
+OS = $(shell uname -s)
+
+.PHONY: mk-symlinks mk-symlinks-$(OS) mk-symlinks-xen
+
+mk-symlinks-Linux: LINUX_ROOT=$(XEN_ROOT)/linux-2.6-xen-sparse
+mk-symlinks-Linux:
+       mkdir -p xen/dom0
+       ( cd xen/dom0 && \
+         ln -sf ../../$(LINUX_ROOT)/include/xen/public/*.h . )
+
+mk-symlinks-xen:
        mkdir -p xen
        ( cd xen && ln -sf ../$(XEN_ROOT)/xen/include/public/*.h . )
        mkdir -p xen/hvm
        ( cd xen/hvm && ln -sf ../../$(XEN_ROOT)/xen/include/public/hvm/*.h . )
        mkdir -p xen/io
        ( cd xen/io && ln -sf ../../$(XEN_ROOT)/xen/include/public/io/*.h . )
-       mkdir -p xen/linux
-       ( cd xen/linux && \
-         ln -sf ../../$(LINUX_ROOT)/include/xen/public/*.h . )
+
+mk-symlinks: mk-symlinks-xen mk-symlinks-$(OS)
diff -r 72f9c751d3ea -r 0261b8ddaa8a tools/console/daemon/io.c
--- a/tools/console/daemon/io.c Wed Apr 19 18:32:20 2006 +0100
+++ b/tools/console/daemon/io.c Wed Apr 19 11:37:30 2006 -0700
@@ -24,7 +24,7 @@
 #include "io.h"
 #include <xenctrl.h>
 #include <xs.h>
-#include <xen/linux/evtchn.h>
+#include <xen/dom0/evtchn.h>
 #include <xen/io/console.h>
 
 #include <malloc.h>
diff -r 72f9c751d3ea -r 0261b8ddaa8a tools/debugger/pdb/pdb_caml_process.c
--- a/tools/debugger/pdb/pdb_caml_process.c     Wed Apr 19 18:32:20 2006 +0100
+++ b/tools/debugger/pdb/pdb_caml_process.c     Wed Apr 19 11:37:30 2006 -0700
@@ -18,7 +18,7 @@
 #include <xenctrl.h>
 #include <xen/xen.h>
 #include <xen/io/domain_controller.h>
-#include <xen/linux/privcmd.h>
+#include <xen/dom0/privcmd.h>
 #include "pdb_module.h"
 #include "pdb_caml_xen.h"
 
diff -r 72f9c751d3ea -r 0261b8ddaa8a tools/debugger/pdb/pdb_caml_xcs.c
--- a/tools/debugger/pdb/pdb_caml_xcs.c Wed Apr 19 18:32:20 2006 +0100
+++ b/tools/debugger/pdb/pdb_caml_xcs.c Wed Apr 19 11:37:30 2006 -0700
@@ -21,7 +21,7 @@
 
 #include <xen/xen.h>
 #include <xen/io/domain_controller.h>
-#include <xen/linux/privcmd.h>
+#include <xen/dom0/privcmd.h>
 
 #include <arpa/inet.h>
 #include <xcs_proto.h>
diff -r 72f9c751d3ea -r 0261b8ddaa8a tools/debugger/pdb/pdb_xen.c
--- a/tools/debugger/pdb/pdb_xen.c      Wed Apr 19 18:32:20 2006 +0100
+++ b/tools/debugger/pdb/pdb_xen.c      Wed Apr 19 11:37:30 2006 -0700
@@ -43,7 +43,7 @@
 
 
 #include <sys/ioctl.h>
-#include <xen/linux/evtchn.h>
+#include <xen/dom0/evtchn.h>
 
 int
 xen_evtchn_bind (int evtchn_fd, int idx)
diff -r 72f9c751d3ea -r 0261b8ddaa8a tools/ioemu/target-i386-dm/helper2.c
--- a/tools/ioemu/target-i386-dm/helper2.c      Wed Apr 19 18:32:20 2006 +0100
+++ b/tools/ioemu/target-i386-dm/helper2.c      Wed Apr 19 11:37:30 2006 -0700
@@ -51,7 +51,7 @@
 
 #include <xenctrl.h>
 #include <xen/hvm/ioreq.h>
-#include <xen/linux/evtchn.h>
+#include <xen/dom0/evtchn.h>
 
 #include "cpu.h"
 #include "exec-all.h"
diff -r 72f9c751d3ea -r 0261b8ddaa8a tools/libxc/xc_private.h
--- a/tools/libxc/xc_private.h  Wed Apr 19 18:32:20 2006 +0100
+++ b/tools/libxc/xc_private.h  Wed Apr 19 11:37:30 2006 -0700
@@ -15,7 +15,7 @@
 
 #include "xenctrl.h"
 
-#include <xen/linux/privcmd.h>
+#include <xen/dom0/privcmd.h>
 
 /* valgrind cannot see when a hypercall has filled in some values.  For this
    reason, we must zero the privcmd_hypercall_t or dom0_op_t instance before a
diff -r 72f9c751d3ea -r 0261b8ddaa8a tools/libxc/xg_private.h
--- a/tools/libxc/xg_private.h  Wed Apr 19 18:32:20 2006 +0100
+++ b/tools/libxc/xg_private.h  Wed Apr 19 11:37:30 2006 -0700
@@ -13,7 +13,7 @@
 #include "xenctrl.h"
 #include "xenguest.h"
 
-#include <xen/linux/privcmd.h>
+#include <xen/dom0/privcmd.h>
 #include <xen/memory.h>
 
 /* valgrind cannot see when a hypercall has filled in some values.  For this
diff -r 72f9c751d3ea -r 0261b8ddaa8a tools/security/get_decision.c
--- a/tools/security/get_decision.c     Wed Apr 19 18:32:20 2006 +0100
+++ b/tools/security/get_decision.c     Wed Apr 19 11:37:30 2006 -0700
@@ -30,7 +30,7 @@
 #include <netinet/in.h>
 #include <xen/acm.h>
 #include <xen/acm_ops.h>
-#include <xen/linux/privcmd.h>
+#include <xen/dom0/privcmd.h>
 
 #define PERROR(_m, _a...) \
 fprintf(stderr, "ERROR: " _m " (%d = %s)\n" , ## _a ,  \
diff -r 72f9c751d3ea -r 0261b8ddaa8a tools/security/secpol_tool.c
--- a/tools/security/secpol_tool.c      Wed Apr 19 18:32:20 2006 +0100
+++ b/tools/security/secpol_tool.c      Wed Apr 19 11:37:30 2006 -0700
@@ -36,7 +36,7 @@
 #include <stdint.h>
 #include <xen/acm.h>
 #include <xen/acm_ops.h>
-#include <xen/linux/privcmd.h>
+#include <xen/dom0/privcmd.h>
 
 #define PERROR(_m, _a...) \
 fprintf(stderr, "ERROR: " _m " (%d = %s)\n" , ## _a ,  \
diff -r 72f9c751d3ea -r 0261b8ddaa8a tools/xenmon/xenbaked.c
--- a/tools/xenmon/xenbaked.c   Wed Apr 19 18:32:20 2006 +0100
+++ b/tools/xenmon/xenbaked.c   Wed Apr 19 11:37:30 2006 -0700
@@ -44,7 +44,7 @@
 #include <xen/xen.h>
 #include <string.h>
 #include <sys/select.h>
-#include <xen/linux/evtchn.h>
+#include <xen/dom0/evtchn.h>
 
 #include "xc_private.h"
 typedef struct { int counter; } atomic_t;
diff -r 72f9c751d3ea -r 0261b8ddaa8a 
tools/xenstat/libxenstat/src/xen-interface.c
--- a/tools/xenstat/libxenstat/src/xen-interface.c      Wed Apr 19 18:32:20 
2006 +0100
+++ b/tools/xenstat/libxenstat/src/xen-interface.c      Wed Apr 19 11:37:30 
2006 -0700
@@ -23,7 +23,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-#include <xen/linux/privcmd.h>
+#include <xen/dom0/privcmd.h>
 
 struct xi_handle {
        int fd;
diff -r 72f9c751d3ea -r 0261b8ddaa8a tools/xenstore/xenstored_domain.c
--- a/tools/xenstore/xenstored_domain.c Wed Apr 19 18:32:20 2006 +0100
+++ b/tools/xenstore/xenstored_domain.c Wed Apr 19 11:37:30 2006 -0700
@@ -38,7 +38,7 @@
 #include "xenstored_test.h"
 
 #include <xenctrl.h>
-#include <xen/linux/evtchn.h>
+#include <xen/dom0/evtchn.h>
 
 static int *xc_handle;
 static evtchn_port_t virq_port;

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.