background image

28-12 Vol. 3C

VMX SUPPORT FOR ADDRESS TRANSLATION

not in the range 0–511, there is a page-modification log-full event and a VM exit occurs. In this case, the 
accessed or dirty flag is not set, and the guest-physical access that triggered the event does not occur.
If instead the PML index is in the range 0–511, the processor proceeds to update accessed or dirty flags for EPT as 
described in Section 28.2.4. If the processor updated a dirty flag for EPT (changing it from 0 to 1), it then operates 
as follows:
1. The guest-physical address of the access is written to the page-modification log. Specifically, the guest-physical 

address is written to physical address determined by adding 8 times the PML index to the PML address. 
Bits 11:0 of the value written are always 0 (the guest-physical address written is thus 4-KByte aligned).

2. The PML index is decremented by 1 (this may cause the value to transition from 0 to FFFFH).
Because the processor decrements the PML index with each log entry, the value may transition from 0 to FFFFH. At 
that point, no further logging will occur, as the processor will determine that the PML index is not in the range 0–
511 and will generate a page-modification log-full event (see above).

28.2.6 

EPT and Memory Typing

This section specifies how a logical processor determines the memory type use for a memory access while EPT is in 
use. (See Chapter 11, “Memory Cache Control” of Intel® 64 and IA-32 Architectures Software Developer’s Manual, 
Volume 3A
 for details of memory typing in the Intel 64 architecture.) Section 28.2.6.1 explains how the memory 
type is determined for accesses to the EPT paging structures. Section 28.2.6.2 explains how the memory type is 
determined for an access using a guest-physical address that is translated using EPT.

28.2.6.1   Memory Type Used for Accessing EPT Paging Structures

This section explains how the memory type is determined for accesses to the EPT paging structures. The determi-
nation is based first on the value of bit 30 (cache disable—CD) in control register CR0:

If CR0.CD = 0, the memory type used for any such reference is the EPT paging-structure memory type, which 
is specified in bits 2:0 of the extended-page-table pointer (EPTP), a VM-execution control field (see Section 
24.6.11)
. A value of 0 indicates the uncacheable type (UC), while a value of 6 indicates the write-back type 
(WB). Other values are reserved.

If CR0.CD = 1, the memory type used for any such reference is uncacheable (UC).

The MTRRs have no effect on the memory type used for an access to an EPT paging structure.

28.2.6.2   Memory Type Used for Translated Guest-Physical Addresses

The effective memory type of a memory access using a guest-physical address (an access that is translated 
using EPT) is the memory type that is used to access memory. The effective memory type is based on the value of 
bit 30 (cache disable—CD) in control register CR0; the last EPT paging-structure entry used to translate the guest-
physical address (either an EPT PDE with bit 7 set to 1 or an EPT PTE); and the PAT memory type (see below):

The PAT memory type depends on the value of CR0.PG:
— If CR0.PG = 0, the PAT memory type is WB (writeback).

1

— If CR0.PG = 1, the PAT memory type is the memory type selected from the IA32_PAT MSR as specified in 

Section 11.12.3, “Selecting a Memory Type from the PAT”.

2

1. If the capability MSR IA32_VMX_CR0_FIXED0 reports that CR0.PG must be 1 in VMX operation, CR0.PG can be 0 in VMX non-root 

operation only if the “unrestricted guest” VM-execution control and bit 31 of the primary processor-based VM-execution controls are 

both 1.

2. Table 11-11 in Section 11.12.3, “Selecting a Memory Type from the PAT” illustrates how the PAT memory type is selected based on 

the values of the PAT, PCD, and PWT bits in a page-table entry (or page-directory entry with PS = 1). For accesses to a guest paging-

structure entry X, the PAT memory type is selected from the table by using a value of 0 for the PAT bit with the values of PCD and 

PWT from the paging-structure entry Y that references X (or from CR3 if X is in the root paging structure). With PAE paging, the PAT 

memory type for accesses to the PDPTEs is WB.