[Lguest] Error inserting lg: Cannot allocate memory
Stefan Hellermann
stefan at the2masters.de
Wed Mar 5 07:39:17 EST 2008
Rusty Russell schrieb:
> On Monday 25 February 2008 09:05:49 Stefan Hellermann wrote:
>> Hello,
>>
>> I would like to try lguest, but I it doesn't work here. When I load lg it
>> says: FATAL: Error inserting lg
>> (/lib/modules/2.6.25-rc2-via/kernel/drivers/lguest/lg.ko): Cannot allocate
>> memory
>>
>> dmesg says:
>> allocation failed: out of vmalloc space - use vmalloc=<size> to increase
>> size. lguest: could not map switcher pages high
>
> OK, I found this one (sorry for the delay, I was away).
>
> Does this work for you? It works for me...
I did some further testing, applying 3 patches I found in Ingo Molnars testing tree, I got
almost everything working.
To solve the TSC-problem I applied
bd860da53caf6971398fac152f21dfec56b087a4 x86: if we cannot calibrate the TSC, we panic.
86e1e14ab3cc75432806fe46dfd57f149c39e2b1 lguest: sanitize the clock
and to solve many segfaults I applied
265e3beb151ca18386281de5120552406c7920c2 x86/lguest: fix pgdir pmd index calculation
which all do what they are supposed to do :)
The only remaining problem is, that I can't get any network connection out of the guest.
This is similar to http://ozlabs.org/pipermail/lguest/2008-March/001011.html
I used a bridged networking, but the same problem.
But for the undermentioned patch I can give my first:
Tested-by: Stefan Hellermann
Thanks
Stefan
>
> 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