Specifications

Intel
®
64 and IA-32 Architectures Software Developer’s Manual Documentation Changes 264
Documentation Changes
...
21.10 SOFTWARE USE OF THE VMCS AND RELATED
STRUCTURES
This section details guidelines that software should observe when using a VMCS and
related structures. It also provides descriptions of consequences for failing to follow
guidelines.
21.10.1 Software Use of Virtual-Machine Control Structures
To ensure proper processor behavior, software should observe certain guidelines when
using an active VMCS.
No VMCS should ever be active on more than one logical processor. If a VMCS is to be
“migrated” from one logical processor to another, the first logical processor should
execute VMCLEAR for the VMCS (to make it inactive on that logical processor and to
ensure that all VMCS data are in memory) before the other logical processor executes
VMPTRLD for the VMCS (to make it active on the second logical processor). A VMCS that
is made active on more than one logical processor may become corrupted (see below).
Software should use the VMREAD and VMWRITE instructions to access the different
fields in the current VMCS (see Section 21.10.2). Software should never access or
modify the VMCS data of an active VMCS using ordinary memory operations, in part
because the format used to store the VMCS data is implementation-specific and not
architecturally defined, and also because a logical processor may maintain some VMCS
Figure 21-1 States of VMCS X
Active
Not Current
Clear
Active
Current
Clear
Inactive
Not Current
Clear
Active
Not Current
Launched
Active
Current
Launched
V
M
P
T
R
L
D
X
V
MC
L
E
A
R
X
VMLAUNCH
VMC
L
EA
R
X
VMCLEAR XVMCLEAR X
VMCLEAR X
Anything
Else
VMPTRLD X
VMPTRLD Y
VMPTRLD X
VMPTRLD Y