xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Keir Fraser <keir.fraser@eu.citrix.com>
To: Sylvestre Gallon <syl@pmbsd.org>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: How works Xen mmu ?
Date: Thu, 3 Jun 2010 16:54:57 +0100	[thread overview]
Message-ID: <C82D8EE1.169F5%keir.fraser@eu.citrix.com> (raw)
In-Reply-To: <AANLkTim_nFD-ZeEblT95_XGBRLtlLZip_W4ydxHAi1al@mail.gmail.com>

On 03/06/2010 16:23, "Sylvestre Gallon" <syl@pmbsd.org> 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

  reply	other threads:[~2010-06-03 15:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-18  8:01 How works Xen mmu ? Sylvestre Gallon
2010-06-02 20:07 ` Keir Fraser
2010-06-03 13:16   ` Sylvestre Gallon
2010-06-03 13:29     ` Keir Fraser
2010-06-03 15:23       ` Sylvestre Gallon
2010-06-03 15:54         ` Keir Fraser [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-05-25 13:07 Sylvestre Gallon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C82D8EE1.169F5%keir.fraser@eu.citrix.com \
    --to=keir.fraser@eu.citrix.com \
    --cc=syl@pmbsd.org \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).