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

Table Of Contents
Vol. 3 25-27
SYSTEM MANAGEMENT
Unlike other VM exits, SMM VM exits can begin in VMX root operation. SMM VM exits
result from the arrival of an SMI outside SMM or from execution of VMCALL in VMX
root operation outside SMM. Execution of VMCALL in VMX root operation causes an
SMM VM exit only if the valid bit is set in the IA32_SMM_MONITOR_CTL MSR (see
Section 25.15.5).
Execution of VMCALL in VMX root operation causes an SMM VM exit even under the
default treatment. This SMM VM exit activates the dual-monitor treatment (see
Section 25.15.6).
Differences between SMM VM exits and other VM exits are detailed in Sections
25.15.2.1 through 25.15.2.5. Differences between SMM VM exits that activate the
dual-monitor treatment and other SMM VM exits are described in Section 25.15.6.
25.15.2.1 Architectural State Before a VM Exit
System-management interrupts (SMIs) that cause SMM VM exits always do so
directly. They do not save state to SMRAM as they do under the default treatment.
25.15.2.2 Updating the Current-VMCS and Executive-VMCS Pointers
SMM VM exits begin by performing the following steps:
1. The executive-VMCS pointer field in the SMM-transfer VMCS is loaded as follows:
If the SMM VM exit commenced in VMX non-root operation, it receives the
current-VMCS pointer.
If the SMM VM exit commenced in VMX root operation, it receives the VMXON
pointer.
2. The current-VMCS pointer is loaded with the value of the SMM-transfer VMCS
pointer.
The last step ensures that the current VMCS is the SMM-transfer VMCS. VM-exit
information is recorded in that VMCS, and VM-entry control fields in that VMCS are
updated. State is saved into the guest-state area of that VMCS. The VM-exit controls
and host-state area of that VMCS determine how the VM exit operates.
25.15.2.3 Recording VM-Exit Information
SMM VM exits differ from other VM exit with regard to the way they record VM-exit
information. The differences follow.
Exit reason.
Bits 15:0 of this field contain the basic exit reason. The field is loaded with
the reason for the SMM VM exit: I/O SMI (an SMI arrived immediately after
retirement of an I/O instruction), other SMI, or VMCALL. See Appendix I,
“VMX Basic Exit Reasons”.