xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* Manual differ from source code about Unrestricted Guest
@ 2011-06-07 15:41 confucius
  2011-06-07 16:19 ` Ian Campbell
  2011-06-07 20:33 ` Tim Deegan
  0 siblings, 2 replies; 7+ messages in thread
From: confucius @ 2011-06-07 15:41 UTC (permalink / raw)
  To: xen-devel

As italics show:
Some processors allow guest software to run in unpaged protected mode or in
real-address
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: 
Xen-4.0/tools/libxc/xc_hvm_build.c 
setup_guest()
{
…………………
/*
     * 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
superpages.
     */
    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: http://xen.1045712.n5.nabble.com/Manual-differ-from-source-code-about-Unrestricted-Guest-tp4462113p4462113.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-06-08  8:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-07 15:41 Manual differ from source code about Unrestricted Guest confucius
2011-06-07 16:19 ` Ian Campbell
2011-06-08  5:01   ` confucius
2011-06-08  8:08     ` Ian Campbell
2011-06-07 20:33 ` Tim Deegan
2011-06-08  5:33   ` confucius
2011-06-08  8:21     ` Tim Deegan

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).