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] PAE, Elf headers, and Extended CR3 registers

To: Randy Thelen <rthelen@xxxxxxxxxx>
Subject: Re: [Xen-devel] PAE, Elf headers, and Extended CR3 registers
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Fri, 15 Sep 2006 10:40:39 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 15 Sep 2006 02:39:30 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <F540B38B-EEA9-4702-9F2F-161540EC34AB@xxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcbYqwC8Py+R6USeEdulegAX8io7RQ==
Thread-topic: [Xen-devel] PAE, Elf headers, and Extended CR3 registers
User-agent: Microsoft-Entourage/
'Extended CR3' means that, on PAE, we fold the higher-order bits of the page
directory address into the low-order bits of the 32-bit virtual CR3 value.

See the xen_pfn_to_cr3() and xen_cr3_to_pfn() macros in

In general the guest OS does not manipulate CR3 values at the hypercall
interface, so this is not an issue (e.g., the hypercall for switching
pagetable base pointer takes a page frame number). The one exception in
Linux was that SMP booting required writing a CR3 value into a vcpu_context
structure. So that's the only place we use those two conversion macros.

 -- Keir

On 14/9/06 21:37, "Randy Thelen" <rthelen@xxxxxxxxxx> wrote:

> In the case of PAEKERN_extended_cr3, a 64 bit cr3 register is assumed
> and thus any page in the memory space (up to 64GB) is a valid page
> directory.  Whereas with a x86-class processor, only a 32 bit CR3
> register is present and so the page directory has to be in the low 4GB.
> ??  What am I missing?
> I'm trying to get FreeBSD 6.0 in 32 bit mode + Xen 3.0 support
> running in on a 32 bit Xen w/ PAE and I just want to understand the
> cr3 register from Xen's point of view.

Xen-devel mailing list