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

Table Of Contents
23-26 Vol. 3
VM EXITS
I/O RCX, I/O RSI, I/O RDI, I/O RIP. These fields are undefined except for
SMM VM exits due to system-management interrupts (SMIs) that arrive
immediately after retirement of I/O instructions. See Section 25.15.2.3.
23.3 SAVING GUEST STATE
Each field in the guest-state area of the VMCS (see Section 20.4) is written with the
corresponding component of processor state. On processors that support Intel 64
architecture, the full values of each natural-width field (see Section 20.10.2) is saved
regardless of the mode of the logical processor before and after the VM exit.
In general, the state saved is that which was in the logical processor at the time the
VM exit commences. See Section 23.1 for a discussion of which architectural updates
occur at that time.
Section 23.3.1 through Section 23.3.4 provide details for how certain components of
processor state are saved. These sections reference VMCS fields that correspond to
processor state. Unless otherwise stated, these references are to fields in the guest-
state area.
23.3.1 Saving Control Registers, Debug Registers, and MSRs
Contents of certain control registers, debug registers, and MSRs is saved as follows:
The contents of CR0, CR3, CR4, and the IA32_SYSENTER_CS,
IA32_SYSENTER_ESP, and IA32_SYSENTER_EIP MSRs are saved into the corre-
sponding fields. Bits 63:32 of the IA32_SYSENTER_CS MSR are not saved. On
processors that do not support Intel 64 architecture, bits 63:32 of the
IA32_SYSENTER_ESP and IA32_SYSENTER_EIP MSRs are not saved.
If the “save debug controls” VM-exit control is 1, the contents of DR7 and the
IA32_DEBUGCTL MSR are saved into the corresponding fields. Note that the first
processors to support the virtual-machine extensions supported only the 1-
setting of this control and thus always saved data into these fields.
If the “save IA32_PAT” VM-exit control is 1, the contents of the IA32_PAT MSR
are saved into the corresponding field.
If the “save IA32_EFER” VM-exit control is 1, the contents of the IA32_EFER MSR
are saved into the corresponding field.
The value of the SMBASE field is undefined after all VM exits except SMM
VM exits. See Section 25.15.2.