Just for info, in-between, I got a flash ;-) and realized that the calculation
is correct. Actually, we always consider 2-levels of page table, therefore
there is at least one L1 table, and it covers all the pages which are allocated.
But now, I''ve some other questions regarding miniOS; however,
I''m note sure it''s still relevant in this mailing list; miniOS
is maybe not
of interest anymore (for me it is since I''m using it on ARM processor).
Can somebody tell me if there is still some activities along miniOS or another
mailing list devoted to it?
Thanks
Daniel
From: xen-devel-bounces@lists.xensource.com
[mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of ROSSIER Daniel
Sent: vendredi, 22. mai 2009 08:26
To: xen-devel@lists.xensource.com
Subject: [Xen-devel] miniOS page table allocation
Hi Folks,
I''m sorry to come with a so technical question, but I''m
working out a port of XEN on ARM in the context of EmbeddedXEN project.
I digged into miniOS and found something which seems strange to me: the
build_pagetable() function in mm.c.
This function aims at building up the additional page tables which were not
allocated by the hypervisor during the
domain construction (domain_build.c). I do not understand the following
calculation:
pfn_to_map = (start_info.nr_pt_frames - NOT_L1_FRAMES) * L1_PAGETABLE_ENTRIES;
pfn_to_map is supposed to be the first page frame number to be mapped by the
function. However, the guest OS gets
a list of pfns (start_pfn - max_pfn, including the phys_to_machine table)
assigned by the hypervisor, and the first pfns are supposed to contain the
startup code and
initial page tables (L2-L1). In this calculation, NOT_L1_FRAMES are typically L2
(and L3,L4 eventually) page table frames. Then, going through the code
pfn_to_map is directly converted to the virtual address and mapped in the
corresponding page tables. So, my problem is we do not consider
the L2,L3,L4 frames which are supposed to be in the same virtual address space
of the guest OS.
I would expect something like pfn_to_map = *start_pfn + (start_info.nr_pt_frames
- NOT_L1_FRAMES)*L1_PAGETABLE_ENTRIES.
Many thanks for any inputs.
Daniel
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel