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-ia64-devel

[Xen-devel] [PATCH] runtime-xenelf-check.patch

To: Ian Pratt <Ian.Pratt@xxxxxxxxxxxx>, Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] runtime-xenelf-check.patch
From: Arun Sharma <arun.sharma@xxxxxxxxx>
Date: Wed, 11 May 2005 11:51:46 -0700
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 11 May 2005 18:50:29 +0000
Envelope-to: www-data@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/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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.1i
Permit both paravirtualized (i.e. with __xen_guest section) and fully 
virtualized kernels as domain 0.
Currently this is decided at compile time, we'd like to make it a runtime check.

Signed-off-by: Kevin Tian <kevin.tian@xxxxxxxxx>
Signed-off-by: Arun Sharma <arun.sharma@xxxxxxxxx>

--- 1.19/xen/common/elf.c       2005-04-03 04:22:10 -07:00
+++ edited/xen/common/elf.c     2005-05-11 11:35:24 -07:00
@@ -11,12 +11,6 @@
 #include <xen/elf.h>
 #include <xen/sched.h>
 
-#ifdef CONFIG_X86
-#define FORCE_XENELF_IMAGE 1
-#elif defined(__ia64__)
-#define FORCE_XENELF_IMAGE 0
-#endif
-
 static void loadelfsymtab(struct domain_setup_info *dsi, int doload);
 static inline int is_loadable_phdr(Elf_Phdr *phdr)
 {
@@ -88,9 +82,12 @@
     if ( guestinfo == NULL )
     {
         printk("Not a Xen-ELF image: '__xen_guest' section not found.\n");
-#if FORCE_XENELF_IMAGE
+       dsi->xen_elf_image = 0;
+#if CONFIG_FORCE_XENELF_IMAGE
         return -EINVAL;
 #endif
+    } else {
+       dsi->xen_elf_image = 1;
     }
 
     for ( h = 0; h < ehdr->e_phnum; h++ ) 
===== xen/include/asm-ia64/config.h 1.23 vs edited =====
--- 1.23/xen/include/asm-ia64/config.h  2005-05-10 15:58:26 -07:00
+++ edited/xen/include/asm-ia64/config.h        2005-05-11 11:43:03 -07:00
@@ -9,6 +9,7 @@
 
 // defined in linux/arch/ia64/defconfig
 //#define      CONFIG_IA64_GENERIC
+#define        CONFIG_FORCE_XENELF_IMAGE 0
 #define        CONFIG_IA64_HP_SIM
 #define        CONFIG_IA64_L1_CACHE_SHIFT 7
 // needed by include/asm-ia64/page.h
===== xen/include/asm-x86/config.h 1.51 vs edited =====
--- 1.51/xen/include/asm-x86/config.h   2005-05-09 10:50:07 -07:00
+++ edited/xen/include/asm-x86/config.h 2005-05-11 11:35:26 -07:00
@@ -11,6 +11,7 @@
 
 #define CONFIG_X86 1
 #define CONFIG_SHADOW 1
+#define CONFIG_FORCE_XENELF_IMAGE 1
 
 #define CONFIG_SMP 1
 #define CONFIG_X86_LOCAL_APIC 1
===== xen/include/xen/sched.h 1.175 vs edited =====
--- 1.175/xen/include/xen/sched.h       2005-05-11 07:12:02 -07:00
+++ edited/xen/include/xen/sched.h      2005-05-11 11:35:25 -07:00
@@ -163,6 +163,8 @@
     unsigned int  load_symtab;
     unsigned long symtab_addr;
     unsigned long symtab_len;
+    /* Indicate whether it's xen specific image */
+    unsigned int xen_elf_image;
 };
 
 #include <asm/uaccess.h> /* for KERNEL_DS */

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] runtime-xenelf-check.patch, Arun Sharma <=