WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: "reserve_top_address" and the kernel virtual memory with

To: "Peter Teoh" <htmldeveloper@xxxxxxxxx>
Subject: [Xen-devel] Re: "reserve_top_address" and the kernel virtual memory with KML.
From: "amit regmi" <regmi.amit@xxxxxxxxx>
Date: Sat, 30 Aug 2008 23:48:27 -0400
Cc: Kernel Newbies <kernelnewbies@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sat, 30 Aug 2008 20:48:54 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=RmnpsFtsAoj8/k9FrWI9SzxCRJtjlRpY5XxC/7kNexw=; b=eHjRoQ/WfDbAt1lDsYOepDhrjzpp599lOp1AJL1T+8gRu1kxCBzebh/zU5iJEuy+eG 4JR8oLnburF5nIFsBlKp/bg3TZKNia1x8CwzkvaL7FdSPY9pKPnOo+CMz5n/hO3rj/Lj zfNzU2Urwof0Xdl05t4kYSbSAwtzbLSipTX2I=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=ACMynJpiNnHBgumboS/Vj6a3NCnwy3bL5HCP1qBy7jLjuRle7jMyFSbQ7U38VeqvXj FF5cIhmw54eGcTbZJvK8f+Vb8YB5gJvI5ThjJqbVXPRplF2z99LNIGAbWiGDRKxuO0UT 3P8J6jgMxa+e3k0moeW6EzxeSH2gETFx21y/Q=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <804dabb00808301938i287a1fbdq6d859b89990898a@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <df184c060808292213y72caa96cubdb7e3dd290e7540@xxxxxxxxxxxxxx> <804dabb00808301938i287a1fbdq6d859b89990898a@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Sat, Aug 30, 2008 at 10:38 PM, Peter Teoh <htmldeveloper@xxxxxxxxx> wrote:

On Sat, Aug 30, 2008 at 1:13 PM, amit regmi <regmi.amit@xxxxxxxxx> wrote:

> I have a Kernel Mode Linux running(KML). I can access kernel
> virtual addresses using User Programs. I wanted to get hold of upper Kernel
> memory (beyond 0xff800000 till 0xffffffff) and experiment a bit. To achieve
> the
> same I requested for a memory hole in "start_kernel" of /init/main.c as
> follows:
>
>     .....
>     printk(linux_banner);
>     setup_arch(&command_line);
>
>     //ask for 8 MB topmost
>     reserve_top_address(8388608ul);
>
Probably this was too early to have called "reserve_top_address" .
I tried shifting this call to the place right before the mem_init() in the same function.

    vfs_caches_init_early();
    cpuset_init_early();

    //ask for 8 MB topmost
    reserve_top_address(8388608ul);

    mem_init();
    enable_debug_pagealloc();

 This time I got a kernel panic instead and the error said "unknown_bootoption+0x0/0x1f0".

according to:

http://www.ussg.iu.edu/hypermail/linux/kernel/0806.2/2629.html

it seemed to indicate that the minimum size for reservation (for
purpose of hypervisor implementation) is 128M.   So could that be the
reason why 8MB is not possible?

I think it says that the default 128 MB size allocated for  "vmalloc" can be altered with the "size" parameter.
Again, reserve_top_address also has an impact on the amount of memory given to vmalloc as it resizes the
__VMALLOC_RESERVE  parameter. I am sure it 128M could be a thing to try out.

>     mm_init_owner(&init_mm, &init_task);
>     setup_command_line(command_line);
>     .....
>
> The kernel image din't boot up. I might be reserving at the wrong place in
> code
> or I might be carelessly doing something impossible. On a black screen  I
> got
> the following error:
>
> BUG: Int 6: CR2 00000000
>     EDI C03f5000 ESI 00800000 ......
>     EBX .....
>     err 00000000 ...
> Stack: 00010800 ....
>     ......
>     ......
>
> Is there anywhere else I can plug in the "reserve_top_address" and play with
> the
> kernel space memory ? Certain hypervisors would be doing similar trick but I
> am
> not so sure how.
 
Google says  Xen makes use of "reserve_top_address". May be they can help.

-Regmee
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>