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


Re: [Xen-devel] How works Xen mmu ?

To: Sylvestre Gallon <syl@xxxxxxxxx>
Subject: Re: [Xen-devel] How works Xen mmu ?
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Thu, 3 Jun 2010 16:54:57 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 03 Jun 2010 08:56:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AANLkTim_nFD-ZeEblT95_XGBRLtlLZip_W4ydxHAi1al@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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcsDMLgmQGI/C57LRF+XVwaIibv/AwABGUph
Thread-topic: [Xen-devel] How works Xen mmu ?
User-agent: Microsoft-Entourage/
On 03/06/2010 16:23, "Sylvestre Gallon" <syl@xxxxxxxxx> wrote:

>> This is closer, but page table entries will be 64 bits not 32 bits (hence
>> use uint64_t). And also the page tables will have three or four levels
>> (depending on whether your guest is 32-bit PAE or 64-bit). So in the 64-bit
>> case for example, you would read cr3 to get pagedir_1, then index into
>> pagedir_1 to get pagedir_2, then index into pagedir_2 to get pagedir_3, then
>> index into pagedir_3 to get the pagetable. And mmu.ptr would point at an
>> entry in that pagetable.
> OK , I see.
> I still have a question, does I need to compile my kernel with -m64 ?
> If not how can I use 64bits addresses ?

That's not something I can answer in a short email. Suffice to say, if your
kernel is 32-bit PAE then the pagetables are 3-level, with 64-bit entries,
and the steps I outline above would be suitably modified for that structure.
This is all x86 architectural stuff, so you can go look in manuals and books
and other code to get an idea of how it all works.

 -- Keir

Xen-devel mailing list

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