diff -upr linux/arch/x86/kernel/setup_32.c linux.new/arch/x86/kernel/setup_32.c --- linux/arch/x86/kernel/setup_32.c 2008-06-24 10:16:10.000000000 +0800 +++ linux.new/arch/x86/kernel/setup_32.c 2008-06-24 10:20:28.000000000 +0800 @@ -313,7 +313,8 @@ static int __init parse_vmalloc(char *ar if (!arg) return -EINVAL; - __VMALLOC_RESERVE = memparse(arg, &arg); + /* Add VMALLOC_OFFSET to the parsed value due to vm area guard hole*/ + __VMALLOC_RESERVE = memparse(arg, &arg) + VMALLOC_OFFSET; return 0; } early_param("vmalloc", parse_vmalloc); diff -upr linux/include/asm-x86/page_32.h linux.new/include/asm-x86/page_32.h --- linux/include/asm-x86/page_32.h 2008-06-24 10:16:34.000000000 +0800 +++ linux.new/include/asm-x86/page_32.h 2008-06-24 10:17:49.000000000 +0800 @@ -82,7 +82,6 @@ extern unsigned int __VMALLOC_RESERVE; extern int sysctl_legacy_va_layout; #define VMALLOC_RESERVE ((unsigned long)__VMALLOC_RESERVE) -#define MAXMEM (-__PAGE_OFFSET - __VMALLOC_RESERVE) #ifdef CONFIG_X86_USE_3DNOW #include diff -upr linux/include/asm-x86/pgtable_32.h linux.new/include/asm-x86/pgtable_32.h --- linux/include/asm-x86/pgtable_32.h 2008-06-24 10:16:42.000000000 +0800 +++ linux.new/include/asm-x86/pgtable_32.h 2008-06-24 11:46:39.000000000 +0800 @@ -56,8 +56,7 @@ void paging_init(void); * area for the same reason. ;) */ #define VMALLOC_OFFSET (8 * 1024 * 1024) -#define VMALLOC_START (((unsigned long)high_memory + 2 * VMALLOC_OFFSET - 1) \ - & ~(VMALLOC_OFFSET - 1)) +#define VMALLOC_START ((unsigned long)high_memory + VMALLOC_OFFSET) #ifdef CONFIG_X86_PAE #define LAST_PKMAP 512 #else @@ -73,6 +72,8 @@ void paging_init(void); # define VMALLOC_END (FIXADDR_START - 2 * PAGE_SIZE) #endif +#define MAXMEM (VMALLOC_END - PAGE_OFFSET - __VMALLOC_RESERVE) + /* * Define this if things work differently on an i386 and an i486: * it will (on an i486) warn about kernel memory accesses that are