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

Table Of Contents
Vol. 3 22-29
VM ENTRIES
The VM entry is not vectoring and the activity-state field indicates either
shutdown or wait-for-SIPI.
If none of the above hold, the pending debug exceptions field specifies the debug
exceptions that are pending for the guest. There are valid pending debug excep-
tions if either the BS bit (bit 14) or the enable-breakpoint bit (bit 12) is 1. If there
are valid pending debug exceptions, they are handled as follows:
If the VM entry is not vectoring, the pending debug exceptions are treated as
they would had they been encountered normally in guest execution:
If the logical processor is not blocking such exceptions (the interruptibility-
state field indicates no blocking by MOV SS), a debug exception is delivered
after VM entry (see below).
If the logical processor is blocking such exceptions (due to blocking by
MOV SS), the pending debug exceptions are held pending or lost as would
normally be the case.
If the VM entry is vectoring (with interruption type software interrupt or software
exception and with blocking by MOV SS), the following items apply:
For injection of a software interrupt or of a software exception with vector 3
(#BP) or vector 4 (#OF), the pending debug exceptions are treated as they
would had they been encountered normally in guest execution if the corre-
sponding instruction (INT3 or INTO) were executed after a MOV SS that
encountered a debug trap.
For injection of a software exception with a vector other than 3 and 4, the
pending debug exceptions may be lost or they may be delivered after
injection (see below).
If there are no valid pending debug exceptions (as defined above), no pending debug
exceptions are delivered after VM entry.
If a pending debug exception is delivered after VM entry, it has the priority of “traps
on the previous instruction” (see Section 5.9 in the Intel® 64 and IA-32 Architec-
tures Software Developer’s Manual, Volume 3A). Thus, INIT signals and system-
management interrupts (SMIs) take priority of such an exception, as do VM exits
induced by the TPR shadow (see Section 22.6.7) and pending MTF VM exits (see
Section 22.6.8. The exception takes priority over any pending non-maskable inter-
rupt (NMI) or external interrupt and also over VM exits due to the 1-settings of the
“interrupt-window exiting” and “NMI-window exiting” VM-execution controls.
A pending debug exception delivered after VM entry causes a VM exit if the bit 1
(#DB) is 1 in the exception bitmap. If it does not cause a VM exit, it updates DR6
normally.