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] miniOS page table allocation

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] miniOS page table allocation
From: ROSSIER Daniel <Daniel.Rossier@xxxxxxxxxx>
Date: Fri, 22 May 2009 08:26:11 +0200
Accept-language: fr-FR, en-US
Acceptlanguage: fr-FR, en-US
Delivery-date: Thu, 21 May 2009 23:26:34 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcnapjNlqWw3d0+CRqO1ODNsGM6Lew==
Thread-topic: 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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] miniOS page table allocation, ROSSIER Daniel <=