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

Table Of Contents
26-14 Vol. 3
VIRTUAL-MACHINE MONITOR PROGRAMMING CONSIDERATIONS
an execution of the IRET instruction that removed virtual-NMI blocking. In
particular, it provides this indication if the following are both true:
Bit 31 (valid) in the IDT-vectoring information field is 0.
The value of bits 7:0 (vector) of the VM-exit interruption-information field is
not 8 (the VM exit is not due to a double-fault exception).
If both are true and bit 12 of the VM-exit interruption-information field is 1, there
was virtual-NMI blocking before guest software executed the IRET instruction
that caused the fault that caused the VM exit. The VMM should set bit 3 (blocking
by NMI) in the interruptibility-state field (using VMREAD and VMWRITE) before
resuming guest software.
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. The VMM should ensure that the other event is delivered when
guest software is resumed. It can do so using the VM-entry event injection
described in Section 22.5 and detailed in the following paragraphs:
The VMM can copy (using VMREAD and VMWRITE) the contents of the IDT-
vectoring information field (which is presumed valid) to the VM-entry inter-
ruption-information field (which, if valid, will cause the exception to be
delivered as part of the next VM entry).
The VMM should ensure that reserved bits 30:12 in the VM-entry inter-
ruption-information field are 0. In particular, the value of bit 12 in the IDT-
vectoring information field is undefined after all VM exits. If this bit is
copied as 1 into the VM-entry interruption-information field, the next
VM entry will fail because the bit should be 0.
If the “virtual NMIs” VM-execution control is 1 and the value of bits 10:8
(interruption type) in the IDT-vectoring information field is 2 (indicating
NMI), the VM exit occurred during delivery of an NMI that had been
injected as part of the previous VM entry. In this case, bit 3 (blocking by
NMI) will be 1 in the interruptibility-state field in the VMCS. The VMM
should clear this bit; otherwise, the next VM entry will fail (see Section
22.3.1.5).
The VMM can also copy the contents of the IDT-vectoring 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 IDT-vectoring information field.
The VMM can also copy the contents of the VM-exit instruction-length field to
the VM-entry instruction-length field. This need be done only if bits 10:8
(interruption type) in the IDT-vectoring information field indicate either
software interrupt, privileged software exception, or software exception.