From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: How works Xen mmu ? Date: Thu, 3 Jun 2010 16:54:57 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Sylvestre Gallon Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 03/06/2010 16:23, "Sylvestre Gallon" 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