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/
Home Products Support Community News


[Xen-devel] idle_pg_tables??

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] idle_pg_tables??
From: PUCCETTI Armand <armand.puccetti@xxxxxx>
Date: Fri, 01 Sep 2006 18:10:48 +0200
Delivery-date: Fri, 01 Sep 2006 09:09:46 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird (X11/20060615)
In the paging mechanism of XEN what is the role of the variable 'idle_pg_table*' variables ??

For a 4-levels paging system these variables are defined in x86_64.S and partially initialised.
Here is the code, copied from x86_64.S:


/* Initial PML4 -- level-4 page table. */
       .org 0x2000
       .quad idle_pg_table_l3 - __PAGE_OFFSET + 7 # PML4[0]
       .fill 261,8,0
       .quad idle_pg_table_l3 - __PAGE_OFFSET + 7 # PML4[262]

/* Initial PDP -- level-3 page table. */
       .org 0x3000
       .quad idle_pg_table_l2 - __PAGE_OFFSET + 7

/* Initial PDE -- level-2 page table. Maps first 64MB physical memory. */
       .org 0x4000
       .macro identmap from=0, count=32
       .if \count-1
       identmap "(\from+0)","(\count/2)"
       identmap "(\from+(0x200000*(\count/2)))","(\count/2)"
       .quad 0x00000000000001e3 + \from

       .org 0x4000 + PAGE_SIZE

.section ".bss.stack_aligned","w"
       .fill STACK_SIZE,1,0
trying to understand that:

- idle_pg_table_l4 is the same as idle_pg_table and contains 263 enties, all zeroed but two (identical) ones. These two pointers point somewhere close to idle_pg_table_l3. Why are there two identical pointers and why shift them by __PAGE_OFFSET +7?

- idle_pg_table_l3 is located between 0x3000 and 0x4000 , with only the first slot initialised. The later points to
level 2 table with some offset.

- idle_pg_table_l2 has terrible code with a recursive macro, who expands into 63 quad constants. It is unclear to me why this complicated macro?? I would have put a table of constants pretty simply... Every entry in that l2 table points to a fixed address, at intervals of 4K (a page).l2 tables are located between 0x01E3 to 0x03E001E3 in groups. Every group is apparently a set of 4 page tables and each table has a size of 128K. Groups are separated by approx 256MB.
Why are these spacings and groups?

- idle_pg_table_l1 is not an entry and so l1 tables are not allocated. Why?

thanks for help!


Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>