Vol. 3C 31-9
VIRTUAL-MACHINE MONITOR PROGRAMMING CONSIDERATIONS
•
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.
A VMM can reflect a double-fault exception to guest software by setting the VM-entry interruption-
information and VM-entry exception error-code fields as follows:
•
Set bits 7:0 (vector) of the VM-entry interruption-information field to 8 (#DF).
•
Set bits 10:8 (interruption type) of the VM-entry interruption-information field to 3 (hardware
exception).
•
Set bit 11 (deliver error code) of the VM-entry interruption-information field to 1.
•
Clear bits 30:12 (reserved) of VM-entry interruption-information field.
•
Set bit 31 (valid) of VM-entry interruption-information field.
•
Set the VM-entry exception error-code field to zero.
— If the value of bits 10:8 of the IDT-vectoring information field is 3 (hardware exception) and the value of
bits 7:0 is 8 (#DF), guest software would have encountered a triple fault. Event injection should not be
used in this case. The VMM may choose to terminate the guest, or it might choose to enter the guest in the
shutdown activity state.
31.7.1.2 Resuming Guest Software after Handling an Exception
If the VMM determines that a VM exit was caused by an exception due to a condition established by the VMM itself,
it may choose to resume guest software after removing the condition. The approach for removing the condition
may be specific to the VMM’s software architecture. and algorithms This section describes how guest software may
be resumed after removing the condition.
In general, the VMM can resume guest software simply by executing VMRESUME. The following items provide
details of cases that may require special handling:
•
If the “NMI exiting” VM-execution control is 0, bit 12 of the VM-exit interruption-information field indicates that
the VM exit was due to a fault encountered during an execution of the IRET instruction that unblocked non-
maskable interrupts (NMIs). 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, NMIs were blocked 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.
•
If the “virtual NMIs” VM-execution control is 1, bit 12 of the VM-exit interruption-information field indicates
that the VM exit was due to a fault encountered during 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