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


[Xen-devel] Manual differ from source code about Unrestricted Guest

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Manual differ from source code about Unrestricted Guest
From: confucius <henanwxr@xxxxxxxxxxx>
Date: Tue, 7 Jun 2011 08:41:04 -0700 (PDT)
Delivery-date: Tue, 07 Jun 2011 08:41:43 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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
As italics show:
Some processors allow guest software to run in unpaged protected mode or in
mode, such guest called “unrestricted guest”.
If CR0.PG = 0, each linear address is passed directly to the EPT mechanism
for translation to a physical address.”
References to Intel® 64 and IA-32 Architectures Software Developer’s Manual
Volume 3B:System Programming Guide, Part 2  22.8 UNRESTRICTED GUESTS

When we set CR0.PG=0 of a guest, I think it doesn’t need construct a page
table for the unpaged guest, but I found it construct an identify_map table
for unpaged guest in the source codes of xen. As follow: 
     * Identity-map page table is required for running with CR0.PG=0 when
     * using Intel EPT. Create a 32-bit non-PAE page directory of
    if ( (ident_pt = xc_map_foreign_range(
              xc_handle, dom, PAGE_SIZE, PROT_READ | PROT_WRITE,
              special_pfn(SPECIALPAGE_IDENT_PT))) == NULL )
        goto error_out;
    for ( i = 0; i < PAGE_SIZE / sizeof(*ident_pt); i++ )
        ident_pt[i] = ((i << 22) | _PAGE_PRESENT | _PAGE_RW | _PAGE_USER |
                       _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_PSE);
    munmap(ident_pt, PAGE_SIZE);

Why construct such identity map table for unpaged guest?
In my opinion, guset_cr3 doesn’t function when set CR0.PG=0, can guest_cr3
of this unpaged guest point to identity map table?

View this message in context: 
Sent from the Xen - Dev mailing list archive at Nabble.com.

Xen-devel mailing list