[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

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



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.