Specifications

Intel
®
64 and IA-32 Architectures Software Developer’s Manual Documentation Changes 270
Documentation Changes
11. Updates to Chapter 27, Volume 3B
Change bars show changes to Chapter 27 of the Intel
®
64 and IA-32 Architectures Soft-
ware Developer’s Manual, Volume 3B: System Programming Guide, Part 2.
------------------------------------------------------------------------------------------
...
27.3 MANAGING VMCS REGIONS AND POINTERS
A VMM must observe necessary procedures when working with a VMCS, the associated
VMCS pointer, and the VMCS region. It must also not assume the state of persistency for
VMCS regions in memory or cache.
Before entering VMX operation, the host VMM allocates a VMXON region. A VMM can host
several virtual machines and have many VMCSs active under its management. A unique
VMCS region is required for each virtual machine; a VMXON region is required for the
VMM itself.
A VMM determines the VMCS region size by reading IA32_VMX_BASIC MSR; it creates
VMCS regions of this size using a 4-KByte-aligned area of physical memory. Each VMCS
region needs to be initialized with a VMCS revision identifier (at byte offset 0) identical to
the revision reported by the processor in the VMX capability MSR.
NOTE
Software must not read or write directly to the VMCS data region as the
format is not architecturally defined. Consequently, Intel recommends
that the VMM remove any linear-address mappings to VMCS regions
before loading.
System software does not need to do special preparation to the VMXON region before
entering into VMX operation. The address of the VMXON region for the VMM is provided
as an operand to VMXON instruction. Once in VMX root operation, the VMM needs to
prepare data fields in the VMCS that control the execution of a VM upon a VM entry. The
VMM can make a VMCS the current VMCS by using the VMPTRLD instruction. VMCS data
fields must be read or written only through VMREAD and VMWRITE commands respec-
tively.
Every component of the VMCS is identified by a 32-bit encoding that is provided as an
operand to VMREAD and VMWRITE. Appendix H provides the encodings. A VMM must
properly initialize all fields in a VMCS before using the current VMCS for VM entry.
A VMCS is referred to as a controlling VMCS if it is the current VMCS on a logical
processor in VMX non-root operation. A current VMCS for controlling a logical processor
in VMX non-root operation may be referred to as a working VMCS if the logical processor
is not in VMX non-root operation. The relationship of active, current (i.e. working) and
controlling VMCS during VMX operation is shown in Figure 27-1.
NOTE
As noted in Section 21.1, the processor may optimize VMX operation by
maintaining the state of an active VMCS (one for which VMPTRLD has
been executed) on the processor. Before relinquishing control to other
system software that may, without informing the VMM, remove power
from the processor (e.g., for transitions to S3 or S4) or leave VMX
operation, a VMM must VMCLEAR all active VMCSs. This ensures that all