From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Thibault Subject: Re: [bug] pv-grub doesn't run on rhel5 Date: Thu, 14 Aug 2008 16:36:10 +0100 Message-ID: <20080814153610.GV4590@implementation.uk.xensource.com> References: <48A40B17.2090701@redhat.com> <20080814111520.GH4590@implementation.uk.xensource.com> <48A4232B.6040500@redhat.com> <20080814122931.GL4590@implementation.uk.xensource.com> <48A43EAD.7040701@redhat.com> <20080814142849.GS4590@implementation.uk.xensource.com> <48A44967.4060401@redhat.com> <20080814151359.GT4590@implementation.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <20080814151359.GT4590@implementation.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Gerd Hoffmann , Xen Development Mailing List List-Id: xen-devel@lists.xenproject.org Samuel Thibault, le Thu 14 Aug 2008 16:14:00 +0100, a =E9crit : > Gerd Hoffmann, le Thu 14 Aug 2008 17:04:07 +0200, a =E9crit : > > 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 ... >=20 > 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 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) } =20 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 =20 #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 =20 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=3D TARGET_CFLAGS=3D NEWLIB_CFLAGS+=3D-D_I386MACH_ALLOW_HW_INTERRUPTS STUBDOM_SUPPORTED=3D1 +PVGRUB_CPPFLAGS=3D-DDEMAND_MAP_PAGES=3D'((256ULL << 20) / PAGE_SIZE)' -D= HEAP_PAGES=3D'((256ULL << 20) / PAGE_SIZE)' endif ifeq ($(GNU_TARGET_ARCH), x86_64) TARGET_CFLAGS=3D-mno-red-zone @@ -296,7 +297,7 @@ c-stubdom: mini-os-$(XEN_TARGET_ARCH)-c=20 =20 .PHONY: pv-grub pv-grub: mini-os-$(XEN_TARGET_ARCH)-grub libxc grub - DEF_CPPFLAGS=3D"$(TARGET_CPPFLAGS)" DEF_CFLAGS=3D"-DCONFIG_GRUB $(TARGE= T_CFLAGS)" DEF_LDFLAGS=3D"$(TARGET_LDFLAGS)" $(MAKE) -C $(MINI_OS) OBJ_DI= R=3D$(CURDIR)/$< APP_OBJS=3D$(CURDIR)/grub-$(XEN_TARGET_ARCH)/main.a + DEF_CPPFLAGS=3D"$(TARGET_CPPFLAGS) $(PVGRUB_CPPFLAGS)" DEF_CFLAGS=3D"-D= CONFIG_GRUB $(TARGET_CFLAGS)" DEF_LDFLAGS=3D"$(TARGET_LDFLAGS)" $(MAKE) -= C $(MINI_OS) OBJ_DIR=3D$(CURDIR)/$< APP_OBJS=3D$(CURDIR)/grub-$(XEN_TARGE= T_ARCH)/main.a =20 ######### # install