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

Table Of Contents
25-26 Vol. 3
SYSTEM MANAGEMENT
25.15 DUAL-MONITOR TREATMENT OF SMIs AND SMM
Dual-monitor treatment is activated through the cooperation of the executive
monitor (the VMM that operates outside of SMM to provide basic virtualization) and
the SMM monitor (the VMM that operates inside SMM—while in VMX operation—to
support system-management functions). Control is transferred to the SMM monitor
through VM exits; VM entries are used to return from SMM.
The dual-monitor treatment may not be supported by all processors. Software should
consult the VMX capability MSR IA32_VMX_BASIC (see Appendix G.1) to determine
whether it is supported.
25.15.1 Dual-Monitor Treatment Overview
The dual-monitor treatment uses an executive monitor and an SMM monitor. Transi-
tions from the executive monitor or its guests to the SMM monitor are called SMM
VM exits and are discussed in Section 25.15.2. SMM VM exits are caused by SMIs as
well as executions of VMCALL in VMX root operation. The latter allow the executive
monitor to call the SMM monitor for service.
The SMM monitor runs in VMX root operation and uses VMX instructions to establish
a VMCS and perform VM entries to its own guests. This is done all inside SMM (see
Section 25.15.3). The SMM monitor returns from SMM, not by using the RSM instruc-
tion, but by using a VM entry that returns from SMM. Such VM entries are described
in Section 25.15.4.
Initially, there is no SMM monitor and the default treatment (Section 25.14) is used.
The dual-monitor treatment is not used until it is enabled and activated. The steps to
do this are described in Section 25.15.5 and Section 25.15.6.
It is not possible to leave VMX operation under the dual-monitor treatment; VMXOFF
will fail if executed. The dual-monitor treatment must be deactivated first. The SMM
monitor deactivates dual-monitor treatment using a VM entry that returns from SMM
with the “deactivate dual-monitor treatment” VM-entry control set to 1 (see Section
25.15.7).
The executive monitor configures any VMCS that it uses for VM exits to the executive
monitor. SMM VM exits, which transfer control to the SMM monitor, use a different
VMCS. Under the dual-monitor treatment, each logical processor uses a separate
VMCS called the SMM-transfer VMCS. When the dual-monitor treatment is active,
the logical processor maintains another VMCS pointer called the SMM-transfer
VMCS pointer. The SMM-transfer VMCS pointer is established when the dual-
monitor treatment is activated.
25.15.2 SMM VM Exits
An SMM VM exit is a VM exit that begins outside SMM and that ends in SMM.