From mboxrd@z Thu Jan 1 00:00:00 1970 From: confucius Subject: Manual differ from source code about Unrestricted Guest Date: Tue, 7 Jun 2011 08:41:04 -0700 (PDT) Message-ID: <1307461264749-4462113.post@n5.nabble.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org As italics show: Some processors allow guest software to run in unpaged protected mode or in real-address mode, such guest called =E2=80=9Cunrestricted guest=E2=80=9D. If CR0.PG =3D 0, each linear address is passed directly to the EPT mechanis= m for translation to a physical address.=E2=80=9D References to Intel=C2=AE 64 and IA-32 Architectures Software Developer=E2= =80=99s Manual Volume 3B:System Programming Guide, Part 2 22.8 UNRESTRICTED GUESTS When we set CR0.PG=3D0 of a guest, I think it doesn=E2=80=99t need construc= t 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:=20 Xen-4.0/tools/libxc/xc_hvm_build.c=20 setup_guest() { =E2=80=A6=E2=80=A6=E2=80=A6=E2=80=A6=E2=80=A6=E2=80=A6=E2=80=A6 /* * Identity-map page table is required for running with CR0.PG=3D0 when * using Intel EPT. Create a 32-bit non-PAE page directory of superpages. */ if ( (ident_pt =3D xc_map_foreign_range( xc_handle, dom, PAGE_SIZE, PROT_READ | PROT_WRITE, special_pfn(SPECIALPAGE_IDENT_PT))) =3D=3D NULL ) goto error_out; for ( i =3D 0; i < PAGE_SIZE / sizeof(*ident_pt); i++ ) ident_pt[i] =3D ((i << 22) | _PAGE_PRESENT | _PAGE_RW | _PAGE_USER = | _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_PSE); munmap(ident_pt, PAGE_SIZE); =E2=80=A6=E2=80=A6=E2=80=A6=E2=80=A6=E2=80=A6=E2=80=A6=E2=80=A6 } Why construct such identity map table for unpaged guest? In my opinion, guset_cr3 doesn=E2=80=99t function when set CR0.PG=3D0, can = guest_cr3 of this unpaged guest point to identity map table? -- View this message in context: http://xen.1045712.n5.nabble.com/Manual-diffe= r-from-source-code-about-Unrestricted-Guest-tp4462113p4462113.html Sent from the Xen - Dev mailing list archive at Nabble.com.