Intel 64 and IA-32 Architectures Software Developers Manual Volume 3B, System Programming Guide Part 2

Table Of Contents
Vol. 3 24-3
SUPPORT FOR ADDRESS TRANSLATION
If PAE paging is not being used, the MOV to CR3 instruction does not use the
guest-physical address to access memory.
1
Thus, the instruction does not cause
that address to be translated through EPT. The address will be translated through
EPT on the next memory accessing using a linear address.
If PAE paging is being used, the MOV to CR3 instruction loads the four (4) page-
directory-pointer-table entries (PDPTEs) from the guest-physical address. Thus,
the instruction does cause its address to be translated through EPT.
The PDPTEs that are loaded also contain guest-physical addresses. The MOV to
CR3 instruction does not use these addresses to access memory. Thus, the
instruction does not cause these addresses to be translated through EPT. The
guest-physical address in an PDPTE will be translated through EPT on the next
memory accessing using a linear address that uses that PDPTE.
The translation of a linear address to a physical address requires multiple translations
of guest-physical addresses using EPT. Assume, for example, that CR0.PG = 1 and
CR4.PAE = CR4.PSE = 0. The translation of a 32-bit linear address then operates as
follows:
Bits 31:22 of the linear address select an entry in the guest page directory
located at the guest-physical address in CR3. The guest-physical address of the
guest page-directory entry (PDE) is translated through EPT to determine the
guest PDE’s physical address.
Bits 21:12 of the linear address select an entry in the guest page table located at
the guest-physical address in the guest PDE. The guest-physical address of the
guest page-table entry (PTE) is translated through EPT to determine the guest
PTE’s physical address.
Bits 11:0 of the linear address is the offset in the page frame located at the
guest-physical address in the guest PTE. The guest-physical address determined
by this offset is translated through EPT to determine the physical address to
which the original linear address translates.
In addition to translating a guest-physical address to a physical address, EPT speci-
fies the privileges that software is allowed when accessing the address. Attempts at
disallowed accesses are called EPT violations and cause VM exits. See Section
24.2.4.
24.2.2 EPT Translation Mechanism
The EPT translation mechanism uses only bits 47:0 of each guest-physical address.
2
It uses a page-walk length of 4, meaning that at most 4 EPT paging-structure entries
are accessed to translate a guest-physical address.
3
These 48 bits are partitioned by the logical processor to traverse the EPT paging
structures:
1. A logical processor uses PAE paging if CR0.PG = 1, CR4.PAE = 1 and IA32_EFER.LMA = 0. See
Section 3.8 in the Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 3A.