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

Table Of Contents
Vol. 3 23-15
VM EXITS
A fault occurs during event delivery and causes a VM exit (because the bit
associated with the fault is set to 1 in the exception bitmap).
A task switch is invoked through a task gate in the IDT. Note that the VM exit
occurs due to the task switch only after the initial checks of the task switch pass
(see Section 21.6.2).
Event delivery causes an APIC-access VM exit (see Section 21.2).
An EPT violation or EPT misconfiguration that occurs during event delivery.
Note that these fields are used for VM exits that occur during delivery of events
injected as part of VM entry (see Section 22.5.1.2).
A VM exit is not considered to occur during event delivery in any of the following
circumstances:
The original event causes the VM exit directly (for example, because the original
event is a non-maskable interrupt (NMI) and the “NMI exiting” VM-execution
control is 1).
The original event results in a double-fault exception that causes the VM exit
directly.
The VM exit occurred as a result of fetching the first instruction of the handler
invoked by the event delivery.
The VM exit is caused by a triple fault.
The following items detail the use of these fields:
IDT-vectoring information (format given in Table 20-15). The following items
detail how this field is established for VM exits that occur during event delivery:
If the VM exit occurred during delivery of an exception, bits 7:0 receive the
exception vector (at most 31). If the VM exit occurred during delivery of an
NMI, bits 7:0 are set to 2. If the VM exit occurred during delivery of an
external interrupt, bits 7:0 receive the interrupt number.
Bits 10:8 are set to indicate the type of event that was being delivered when
the VM exit occurred: 0 (external interrupt), 2 (non-maskable interrupt), 3
(hardware exception), 4 (software interrupt), 5 (privileged software
interrupt), or 6 (software exception).
Hardware exceptions comprise all exceptions except breakpoint exceptions
(#BP; generated by INT3) and overflow exceptions (#OF; generated by
INTO); these are software exceptions. Note that BOUND range exceeded
exceptions (#BR; generated by BOUND) and invalid opcode exceptions
(#UD) generated by UD2 are hardware exceptions.
Bits 10:8 may indicate privileged software interrupt if such an event was
injected as part of VM entry.
1. This includes the case in which a VM exit occurs while delivering a software interrupt (INT n)
through the 16-bit IVT (interrupt vector table) that is used in virtual-8086 mode with virtual-
machine extensions (if RFLAGS.VM = CR4.VME = 1).