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

[Xen-changelog] Enable test for running_on_xen from modules



# HG changeset patch
# User djm@xxxxxxxxxxxxxxx
# Node ID b4263a0216a9ed6349b883aa3e6bbf790ae440fc
# Parent  98209d207d14d69a338771eb7266751bef4b33d0
Enable test for running_on_xen from modules
Signed-off by: Dan Magenheimer <dan.magenheimer@xxxxxx>

diff -r 98209d207d14 -r b4263a0216a9 linux-2.6-xen-sparse/arch/ia64/xen/Makefile
--- a/linux-2.6-xen-sparse/arch/ia64/xen/Makefile       Fri Nov  4 00:06:15 2005
+++ b/linux-2.6-xen-sparse/arch/ia64/xen/Makefile       Fri Nov  4 03:37:29 2005
@@ -2,4 +2,4 @@
 # Makefile for Xen components
 #
 
-obj-y := hypercall.o xenivt.o xenentry.o xensetup.o xenpal.o xenhpski.o 
xenconsole.o
+obj-y := hypercall.o xenivt.o xenentry.o xensetup.o xenpal.o xenhpski.o 
xenconsole.o xen_ksyms.o
diff -r 98209d207d14 -r b4263a0216a9 
linux-2.6-xen-sparse/arch/ia64/xen/xensetup.S
--- a/linux-2.6-xen-sparse/arch/ia64/xen/xensetup.S     Fri Nov  4 00:06:15 2005
+++ b/linux-2.6-xen-sparse/arch/ia64/xen/xensetup.S     Fri Nov  4 03:37:29 2005
@@ -25,3 +25,9 @@
 (p7)   mov cr.iva=r10
        br.ret.sptk.many rp;;
 END(xen_init)
+
+GLOBAL_ENTRY(is_running_on_xen)
+       movl r9=running_on_xen;;
+       ld4 r8=[r9];;
+       br.ret.sptk.many rp;;
+END(is_running_on_xen)
diff -r 98209d207d14 -r b4263a0216a9 
linux-2.6-xen-sparse/include/asm-ia64/xen/privop.h
--- a/linux-2.6-xen-sparse/include/asm-ia64/xen/privop.h        Fri Nov  4 
00:06:15 2005
+++ b/linux-2.6-xen-sparse/include/asm-ia64/xen/privop.h        Fri Nov  4 
03:37:29 2005
@@ -36,7 +36,12 @@
 #endif
 
 #ifndef __ASSEMBLY__
+#ifdef MODULE
+extern int is_running_on_xen(void);
+#define running_on_xen (is_running_on_xen())
+#else
 extern int running_on_xen;
+#endif
 
 #define        XEN_HYPER_SSM_I                 asm("break 0x7");
 #define        XEN_HYPER_GET_IVR               asm("break 0x8");
diff -r 98209d207d14 -r b4263a0216a9 
linux-2.6-xen-sparse/arch/ia64/xen/xen_ksyms.c
--- /dev/null   Fri Nov  4 00:06:15 2005
+++ b/linux-2.6-xen-sparse/arch/ia64/xen/xen_ksyms.c    Fri Nov  4 03:37:29 2005
@@ -0,0 +1,12 @@
+/*
+ * Architecture-specific kernel symbols
+ *
+ * Don't put any exports here unless it's defined in an assembler file.
+ * All other exports should be put directly after the definition.
+ */
+
+#include <linux/config.h>
+#include <linux/module.h>
+
+extern int is_running_on_xen(void);
+EXPORT_SYMBOL(is_running_on_xen);

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


 


Rackspace

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