[PATCH 7 of 13] Make __FIXADDR_TOP variable to allow it to make space for a hypervisor

[PATCH 7 of 13] Make __FIXADDR_TOP variable to allow it to make space for a hypervisor

Post by Chris Wrig » Wed, 02 Aug 2006 18:10:07



In the native case we lose one page of lowmem now.

thanks,
-chris
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/
 
 
 

[PATCH 7 of 13] Make __FIXADDR_TOP variable to allow it to make space for a hypervisor

Post by Chris Wrig » Thu, 03 Aug 2006 06:40:09


Yes, that does sound quite familiar. I couldn't find the thread, do you
recall any of the details? I expect it's the same issue as the off by one
page I mentioned above.

thanks,
-chris
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/

 
 
 

[PATCH 7 of 13] Make __FIXADDR_TOP variable to allow it to make space for a hypervisor

Post by Chris Wrig » Thu, 03 Aug 2006 16:10:04

Rusty Russell ( XXXX@XXXXX.COM ) wrote:

Here's an updated patch. Rather than use __FIXADDR_TOP to adjust for
MAXMEM, directly update __VMALLOC_RESERVE which is used to reserve the
space for vmalloc, iomap, and fixmap (as comments aptly point out). I
tested this with a bunch of configurations, and booted a XenoLinux
kernel with this patch as well.

thanks,
-chris
Make __FIXADDR_TOP variable to allow it to make space for a hypervisor.

Make __FIXADDR_TOP a variable, so that it can be set to not get in the
way of address space a hypervisor may want to reserve.

Original patch by Gerd Hoffmann < XXXX@XXXXX.COM >

Signed-off-by: Jeremy Fitzhardinge < XXXX@XXXXX.COM >
Signed-off-by: Chris Wright < XXXX@XXXXX.COM >
Cc: Gerd Hoffmann < XXXX@XXXXX.COM >

---
arch/i386/Kconfig | 1 +
arch/i386/mm/init.c | 42 ++++++++++++++++++++++++++++++++++++++++++
arch/i386/mm/pgtable.c | 19 +++++++++++++++++++
include/asm-i386/fixmap.h | 7 ++++++-
4 files changed, 68 insertions(+), 1 deletion(-)

diff -r 5183f1f33cf4 arch/i386/Kconfig
--- a/arch/i386/Kconfig Tue Aug 01 01:06:48 2006 -0400
+++ b/arch/i386/Kconfig Wed Aug 02 02:34:44 2006 -0400
@@ -792,6 +792,7 @@ config COMPAT_VDSO
config COMPAT_VDSO
bool "Compat VDSO support"
default y
+ depends on !PARAVIRT
help
Map the VDSO to the predictable old-style address too.
---help---
diff -r 5183f1f33cf4 arch/i386/mm/init.c
--- a/arch/i386/mm/init.c Tue Aug 01 01:06:48 2006 -0400
+++ b/arch/i386/mm/init.c Wed Aug 02 02:34:44 2006 -0400
@@ -629,6 +629,48 @@ void __init mem_init(void)
(unsigned long) (totalhigh_pages << (PAGE_SHIFT-10))
);

+#if 1 /* double-sanity-check paranoia */
+ printk("virtual kernel memory layout:\n"
+ " fixmap : 0x%08lx - 0x%08lx (%4ld kB)\n"
+#ifdef CONFIG_HIGHMEM
+ " pkmap : 0x%08lx - 0x%08lx (%4ld kB)\n"
+#endif
+ " vmalloc : 0x%08lx - 0x%08lx (%4ld MB)\n"
+ " lowmem : 0x%08lx - 0x%08lx (%4ld MB)\n"
+ " .init : 0x%08lx - 0x%08lx (%4ld kB)\n"
+ " .data : 0x%08lx - 0x%08lx (%4ld kB)\n"
+ " .text : 0x%08lx - 0x%08lx (%4ld kB)\n",
+ FIXADDR_START, FIXADDR_TOP,
+ (FIXADDR_TOP - FIXADDR_START) >> 10,
+
+#ifdef CONFIG_HIGHMEM
+ PKMAP_BASE, PKMAP_BASE+LAST_PKMAP*PAGE_SIZE,
+ (LAST_PKMAP*PAGE_SIZE) >> 10,
+#endif
+
+ VMALLOC_START, VMALLOC_END,
+ (VMALLOC_END - VMALLOC_START) >> 20,
+
+ (unsigned long)__va(0), (unsigned long)high_memory,
+ ((unsigned long)high_memory - (unsigned long)__va(0)) >> 20,
+
+ (unsigned long)&__init_begin, (unsigned long)&__init_end,
+ ((unsigned long)&__init_end - (unsigned long)&__init_begin) >> 10,
+
+ (unsigned long)&_etext, (unsigned long)&_edata,
+ ((unsigned long)&_edata - (unsigned long)&_etext) >> 10,
+
+ (unsigned long)&_text, (unsigned long)&_etext,
+ ((unsigned long)&_etext - (unsigned long)&_text) >> 10);
+
+#ifdef CONFIG_HIGHMEM
+ BUG_ON(PKMAP_BASE+LAST_PKMAP*PAGE_SIZE > FIXADDR_START);
+ BUG_ON(VMALLOC_END > PKMAP_BASE);
+#endif
+ BUG_ON(VMALLOC_START > VMALLOC_END);
+ BUG_ON((unsigned long)high_memory > VMALLOC_START);
+#endif /* double-sanity-check paranoia */
+
#ifdef CONFIG_X86_PAE
if (!cpu