[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] miniOS page table allocation


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • 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
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • 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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.