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

Table Of Contents
Vol. 3 21-13
VMX NON-ROOT OPERATION
APIC-access page is not a VTPR access, even if the “use TPR shadow” VM-execution
control is 1.
In general, VTPR accesses do not cause APIC-access VM exits. Instead, they are
treated as described in Section 21.5.3. Physical VTPR accesses (see Section 21.2.3)
may or may not cause APIC-access VM exits; see Section 21.5.2.
21.3 OTHER CAUSES OF VM EXITS
In addition to VM exits caused by instruction execution, the following events can
cause VM exits:
Exceptions. Exceptions (faults, traps, and aborts) cause VM exits based on the
exception bitmap (see Section 20.6.3). If an exception occurs, its vector (in the
range 0–31) is used to select a bit in the exception bitmap. If the bit is 1, a
VM exit occurs; if the bit is 0, the exception is delivered normally through the
guest IDT. This use of the exception bitmap applies also to exceptions generated
by the instructions INT3, INTO, BOUND, and UD2.
Page faults (exceptions with vector 14) are specially treated. When a page fault
occurs, a logical processor consults (1) bit 14 of the exception bitmap; (2) the
error code produced with the page fault [PFEC]; (3) the page-fault error-code
mask field [PFEC_MASK]; and (4) the page-fault error-code match field
[PFEC_MATCH]. It checks if PFEC & PFEC_MASK = PFEC_MATCH. If there is
equality, the specification of bit 14 in the exception bitmap is followed (for
example, a VM exit occurs if that bit is set). If there is inequality, the meaning of
that bit is reversed (for example, a VM exit occurs if that bit is clear).
Thus, if software desires VM exits on all page faults, it can set bit 14 in the
exception bitmap to 1 and set the page-fault error-code mask and match fields
each to 00000000H. If software desires VM exits on no page faults, it can set bit
14 in the exception bitmap to 1, the page-fault error-code mask field to
00000000H, and the page-fault error-code match field to FFFFFFFFH.
Triple fault. A VM exit occurs if the logical processor encounters an exception
while attempting to call the double-fault handler and that exception itself does
not cause a VM exit due to the exception bitmap. This applies to the case in which
the double-fault exception was generated within VMX non-root operation, the
case in which the double-fault exception was generated during event injection by
VM entry, and to the case in which VM entry is injecting a double-fault exception.
External interrupts. An external interrupt causes a VM exit if the “external-
interrupt exiting” VM-execution control is 1. Otherwise, the interrupt is delivered
normally through the IDT. (If a logical processor is in the shutdown state or the
wait-for-SIPI state, external interrupts are blocked. The interrupt is not delivered
through the IDT and no VM exit occurs.)
Non-maskable interrupts (NMIs). An NMI causes a VM exit if the “NMI
exiting” VM-execution control is 1. Otherwise, it is delivered using descriptor 2 of