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] [bug] pv-grub doesn't run on rhel5

Samuel Thibault, le Thu 14 Aug 2008 16:14:00 +0100, a écrit :
> Gerd Hoffmann, le Thu 14 Aug 2008 17:04:07 +0200, a écrit :
> > Uhm, well, no way to fix minios to run on older xen versions then I
> > guess (which I'd prefer).  Except maybe limiting the 32bit version to
> > 1GB address space.  Which should be fine at least for pvgrub ...
> 
> That should be feasible indeed.

As seen below.  I'm not sure whether we want that into mainline Xen 3.3
however?

BTW, Keir commited the 32on64 pv-grub build, it should appear after the
regression tests.

Samuel



pv-grub: limit address space usage to less than a GB so as to be
runnable on xen hypervisor revisions earlier than c/s 17061.

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>

diff -r 38783464a671 extras/mini-os/arch/x86/mm.c
--- a/extras/mini-os/arch/x86/mm.c      Thu Aug 14 16:16:44 2008 +0100
+++ b/extras/mini-os/arch/x86/mm.c      Thu Aug 14 16:30:59 2008 +0100
@@ -414,18 +414,22 @@ pgentry_t *need_pgt(unsigned long addr)
 }
 
 static unsigned long demand_map_area_start;
+#ifndef DEMAND_MAP_PAGES
 #ifdef __x86_64__
 #define DEMAND_MAP_PAGES ((128ULL << 30) / PAGE_SIZE)
 #else
 #define DEMAND_MAP_PAGES ((2ULL << 30) / PAGE_SIZE)
 #endif
+#endif
 
 #ifdef HAVE_LIBC
 unsigned long heap, brk, heap_mapped, heap_end;
+#ifndef HEAP_PAGES
 #ifdef __x86_64__
 #define HEAP_PAGES ((128ULL << 30) / PAGE_SIZE)
 #else
 #define HEAP_PAGES ((1ULL << 30) / PAGE_SIZE)
+#endif
 #endif
 #endif
 
diff -r 38783464a671 stubdom/Makefile
--- a/stubdom/Makefile  Thu Aug 14 16:16:44 2008 +0100
+++ b/stubdom/Makefile  Thu Aug 14 16:30:59 2008 +0100
@@ -33,6 +33,7 @@ TARGET_CFLAGS=
 TARGET_CFLAGS=
 NEWLIB_CFLAGS+=-D_I386MACH_ALLOW_HW_INTERRUPTS
 STUBDOM_SUPPORTED=1
+PVGRUB_CPPFLAGS=-DDEMAND_MAP_PAGES='((256ULL << 20) / PAGE_SIZE)' 
-DHEAP_PAGES='((256ULL << 20) / PAGE_SIZE)'
 endif
 ifeq ($(GNU_TARGET_ARCH), x86_64)
 TARGET_CFLAGS=-mno-red-zone
@@ -296,7 +297,7 @@ c-stubdom: mini-os-$(XEN_TARGET_ARCH)-c 
 
 .PHONY: pv-grub
 pv-grub: mini-os-$(XEN_TARGET_ARCH)-grub libxc grub
-       DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="-DCONFIG_GRUB 
$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" $(MAKE) -C $(MINI_OS) 
OBJ_DIR=$(CURDIR)/$< APP_OBJS=$(CURDIR)/grub-$(XEN_TARGET_ARCH)/main.a
+       DEF_CPPFLAGS="$(TARGET_CPPFLAGS) $(PVGRUB_CPPFLAGS)" 
DEF_CFLAGS="-DCONFIG_GRUB $(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" 
$(MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< 
APP_OBJS=$(CURDIR)/grub-$(XEN_TARGET_ARCH)/main.a
 
 #########
 # install

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