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

Table Of Contents
Vol. 3 28-1
CHAPTER 28
HANDLING BOUNDARY CONDITIONS IN A VIRTUAL
MACHINE MONITOR
28.1 OVERVIEW
This chapter describes what a VMM must consider when handling exceptions, inter-
rupts, error conditions, and transitions between activity states.
28.2 INTERRUPT HANDLING IN VMX OPERATION
The following bullets summarize VMX support for handling interrupts:
Control of Processor Exceptions. The VMM can get control on specific guest
exceptions through the exception-bitmap in the guest controlling-VMCS. The
exception bitmap is a 32-bit field that allows the VMM to specify processor
behavior on specific exceptions (including traps, faults and aborts). Setting a
specific bit in the exception bitmap implies VM exits will be generated when the
corresponding exception occurs. Any exceptions that are programmed not to
cause VM exits are delivered directly to the guest through the guest IDT. The
exception bitmap also controls execution of relevant instructions such as BOUND,
INTO and INT3. VM exits on page-faults are treated in such a way the page-fault
error-code is qualified through the page fault error-code mask and match fields in
the VMCS.
Control over Triple-faults. If a fault occurs while attempting to call a double-
fault handler in the guest and that fault is not configured to cause a VM exit in the
exception bitmap, the resulting triple fault causes a VM exit.
Control of External-Interrupts. VMX allows both host and guest control of
external interrupts through the “external-interrupt exiting” VM execution control.
With guest control (external-interrupt exiting set to 0), external-interrupts do not
cause VM exits and the interrupt delivery is masked by the guest programmed
RFLAGS.IF value.
1
With host control (external-interrupt exiting set to 1),
external-interrupts causes VM exits and are not masked by RFLAGS.IF. The VMM
can identify VM exits due to external interrupts by checking the exit-reason for an
‘external-interrupt’ (value = 1).
1. This chapter uses the notation RAX, RIP, RSP, RFLAGS, etc. for processor registers because most
processors that support VMX operation also support Intel 64 architecture. For processors that do
not support Intel 64 architecture, this notation refers to the 32-bit forms of those registers
(EAX, EIP, ESP, EFLAGS, etc.).