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

Table Of Contents
Vol. 3 22-23
VM ENTRIES
Section 22.5.1.1 provides details of vectored-event injection. In general, the event is
delivered exactly as if it had been generated normally.
If event delivery encounters a nested exception (for example, a general-protection
exception because the vector indicates a descriptor beyond the IDT limit), the excep-
tion bitmap is consulted using the vector of that exception. If the bit is 0, the excep-
tion is delivered through the IDT. If the bit is 1, a VM exit occurs. Section 22.5.1.2
details cases in which event injection causes a VM exit.
22.5.1.1 Details of Vectored-Event Injection
The event-injection process is controlled by the contents of the VM-entry interruption
information field (format given in Table 20-12), the VM-entry exception error-code
field, and the VM-entry instruction-length field. The following items provide details of
the process:
The value pushed on the stack for RFLAGS is generally that which was loaded
from the guest-state area. The value pushed for the RF flag is not modified based
on the type of event being delivered. However, the pushed value of RFLAGS may
be modified if a software interrupt is being injected into a guest that will be in
virtual-8086 mode (see below). After RFLAGS is pushed on the stack, the value
in the RFLAGS register is modified as is done normally when delivering an event
through the IDT.
The instruction pointer that is pushed on the stack depends on the type of event
and whether nested exceptions occur during its delivery. The term current
guest RIP refers to the value to be loaded from the guest-state area. The value
pushed is determined as follows:
1
If VM entry successfully injects (with no nested exception) an event with
interruption type external interrupt, NMI, or hardware exception, the current
guest RIP is pushed on the stack.
If VM entry successfully injects (with no nested exception) an event with
interruption type software interrupt, privileged software exception, or
software exception, the current guest RIP is incremented by the VM-entry
instruction length before being pushed on the stack.
If VM entry encounters an exception while injecting an event and that
exception does not cause a VM exit, the current guest RIP is pushed on the
stack regardless of event type or VM-entry instruction length. If the
encountered exception does cause a VM exit that saves RIP, the saved RIP is
current guest RIP.
2. This does not imply that injection of an exception or interrupt will cause a VM exit due to the set-
tings of VM-execution control fields (such as the exception bitmap) that would cause a VM exit if
the event had occurred in VMX non-root operation. In contrast, a nested exception encountered
during event delivery may cause a VM exit; see Section 22.5.1.1.
1. While these items refer to RIP, the width of the value pushed (16 bits, 32 bits, or 64 bits) is
determined normally.