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

Table Of Contents
26-12 Vol. 3
VIRTUAL-MACHINE MONITOR PROGRAMMING CONSIDERATIONS
VMWRITE) the contents of the VM-exit interruption-information field (which is valid,
since the VM exit was caused by an exception) to the VM-entry interruption-informa-
tion field (which, if valid, will cause the exception to be delivered as part of the next
VM entry). The VMM would also copy the contents of the VM-exit interruption error-
code field to the VM-entry exception error-code field; this need not be done if bit 11
(error code valid) is clear in the VM-exit interruption-information field. After this, the
VMM can execute VMRESUME.
The following items provide details that may qualify the general approach:
Care should be taken to ensure that reserved bits 30:12 in the VM-entry inter-
ruption-information field are 0. In particular, some VM exits may set bit 12 in the
VM-exit interruption-information field to indicate NMI unblocking due to IRET. If
this bit is copied as 1 into the VM-entry interruption-information field, the next
VM entry will fail because that bit should be 0.
Bit 31 (valid) of the IDT-vectoring information field indicates, if set, that the
exception causing the VM exit occurred while another event was being delivered
to guest software. If this is the case, it may not be appropriate simply to reflect
that exception to guest software. To provide proper virtualization of the exception
architecture, a VMM should handle nested events as a physical processor would.
Processor handling is described in Chapter 5, “Interrupt 8—Double Fault
Exception (#DF)” in Intel® 64 and IA-32 Architectures Software Developer’s
Manual, Volume 3A.
The VMM should reflect the exception causing the VM exit to guest software
in any of the following cases:
The value of bits 10:8 (interruption type) of the IDT-vectoring
information field is anything other than 3 (hardware exception).
The value of bits 7:0 (vector) of the IDT-vectoring information field
indicates a benign exception (1, 2, 3, 4, 5, 6, 7, 9, 16, 17, 18, or 19).
The value of bits 7:0 (vector) of the VM-exit interruption-information field
indicates a benign exception.
The value of bits 7:0 of the IDT-vectoring information field indicates a
contributory exception (0, 10, 11, 12, or 13) and the value of bits 7:0 of
the VM-exit interruption-information field indicates a page fault (14).
If the value of bits 10:8 of the IDT-vectoring information field is 3 (hardware
exception), the VMM should reflect a double-fault exception to guest software
in any of the following cases:
The value of bits 7:0 of the IDT-vectoring information field and the value
of bits 7:0 of the VM-exit interruption-information field each indicates a
contributory exception.
The value of bits 7:0 of the IDT-vectoring information field indicates a
page fault and the value of bits 7:0 of the VM-exit interruption-
information field indicates either a contributory exception or a page fault.