[Lguest] Error inserting lg: Cannot allocate memory

Stefan Hellermann stefan at the2masters.de
Wed Mar 5 03:49:05 EST 2008


> 
> OK, I found this one (sorry for the delay, I was away).
> 
> Does this work for you?  It works for me...

Yes, it works! Thanks!

Now the kernel starts booting but crashes with
Kernel Panic - not syncing: Kernel compiled for Pentium+, requires TSC feature!
lguest: CRASH: Kernel compiled for Pentium+, requires TSC feature!

I think it was already reported on this mailing list, but I can't find it now.
This is Linus current git head with your patch.
# cat /proc/cpuinfo
processor	: 0
vendor_id	: CentaurHauls
cpu family	: 6
model		: 13
model name	: VIA C7 Processor 1800MHz
stepping	: 0
cpu MHz		: 1795.528
cache size	: 128 KB
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 1
wp		: yes
flags		: fpu vme de pse *tsc* msr pae mce cx8 apic sep mtrr cmov pat clflush acpi mmx fxsr
sse sse2 tm nx pni est tm2 xtpr rng rng_en ace ace_en ace2 ace2_en phe phe_en pmm pmm_en
bogomips	: 3592.71
clflush size	: 64


> 
> Thanks very much for your report!
> Rusty.
> ==
> Robert Bragg's 5dc331852848a38ca00a2817e5b98a1d0561b116 tightened
> (ie. fixed) the checking in __get_vm_area, and it broke lguest.
> 
> lguest should pass a valid "end" parameter, not some random constant.
> 
> Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
> Cc: Robert Bragg <robert at sixbynine.org>
> 
> diff -r f5dc1442dc61 drivers/lguest/core.c
> --- a/drivers/lguest/core.c	Tue Mar 04 14:21:38 2008 +1100
> +++ b/drivers/lguest/core.c	Tue Mar 04 21:06:41 2008 +1100
> @@ -71,9 +71,11 @@ static __init int map_switcher(void)
>  
>  	/* Now we reserve the "virtual memory area" we want: 0xFFC00000
>  	 * (SWITCHER_ADDR).  We might not get it in theory, but in practice
> -	 * it's worked so far. */
> +	 * it's worked so far.  The +1 is because __get_vm_area allocates a
> +	 * guard page, so we need space for that. */
>  	switcher_vma = __get_vm_area(TOTAL_SWITCHER_PAGES * PAGE_SIZE,
> -				       VM_ALLOC, SWITCHER_ADDR, VMALLOC_END);
> +				     VM_ALLOC, SWITCHER_ADDR, SWITCHER_ADDR
> +				     + (TOTAL_SWITCHER_PAGES+1) * PAGE_SIZE);
>  	if (!switcher_vma) {
>  		err = -ENOMEM;
>  		printk("lguest: could not map switcher pages high\n");



More information about the Lguest mailing list