background image

Vol. 3C 24-23

VIRTUAL MACHINE CONTROL STRUCTURES

IDT-vectoring error code (32 bits). For VM exits the occur during delivery of hardware exceptions that would 
have delivered an error code on the stack, this field receives that error code.

See Section 27.2.3 provides details of how these fields are saved on VM exits.

24.9.4 

Information for VM Exits Due to Instruction Execution

The following fields are used for VM exits caused by attempts to execute certain instructions in VMX non-root oper-
ation:

VM-exit instruction length (32 bits). For VM exits resulting from instruction execution, this field receives the 
length in bytes of the instruction whose execution led to the VM exit.

1

 See Section 27.2.4 for details of when 

and how this field is used.

VM-exit instruction information (32 bits). This field is used for VM exits due to attempts to execute INS, 
INVEPT, INVVPID, LIDT, LGDT, LLDT, LTR, OUTS, SIDT, SGDT, SLDT, STR, VMCLEAR, VMPTRLD, VMPTRST, 
VMREAD, VMWRITE, or VMXON.

2

 The format of the field depends on the cause of the VM exit. See Section 

27.2.4 for details.

The following fields (64 bits each; 32 bits on processors that do not support Intel 64 architecture) are used only for 
VM exits due to SMIs that arrive immediately after retirement of I/O instructions. They provide information about 
that I/O instruction:

I/O RCX. The value of RCX before the I/O instruction started.

I/O RSI. The value of RSI before the I/O instruction started.

I/O RDI. The value of RDI before the I/O instruction started.

I/O RIP. The value of RIP before the I/O instruction started (the RIP that addressed the I/O instruction).

24.9.5 

VM-Instruction Error Field

The 32-bit VM-instruction error field does not provide information about the most recent VM exit. In fact, it is 
not modified on VM exits. Instead, it provides information about errors encountered by a non-faulting execution of 
one of the VMX instructions.

Table 24-16.  Format of the IDT-Vectoring Information Field

Bit Position(s)

Content

7:0

Vector of interrupt or exception

10:8

Interruption type:

0: External interrupt

1: Not used

2: Non-maskable interrupt (NMI)

3: Hardware exception

4: Software interrupt

5: Privileged software exception

6: Software exception

7: Not used

11

Error code valid (0 = invalid; 1 = valid)

12

Undefined

30:13

Reserved (cleared to 0)

31

Valid

1. This field is also used for VM exits that occur during the delivery of a software interrupt or software exception.
2. Whether the processor provides this information on VM exits due to attempts to execute INS or OUTS can be determined by con-

sulting the VMX capability MSR IA32_VMX_BASIC (see Appendix A.1).