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

Table Of Contents
Vol. 3 20-31
VIRTUAL-MACHINE CONTROL STRUCTURES
Fields whose encodings use value 1 are specially treated to allow 32-bit software
access to all 64 bits of the field. Such access is allowed by defining, for each such
field, an encoding that allows direct access to the high 32 bits of the field. See
below.
Field type. Bits 11:10 encode the type of VMCS field: control, guest-state, host-
state, or read-only data. The last category includes the VM-exit information fields
and the VM-instruction error field.
Index. Bits 9:1 distinguish components with the same field width and type.
Access type. Bit 0 must be 0 for all fields except for 64-bit fields (those with
field-width 1; see above). A VMREAD or VMWRITE using an encoding with this bit
cleared to 0 accesses the entire field. For a 64-bit field with field-width 1, a
VMREAD or VMWRITE using an encoding with this bit set to 1 accesses only the
high 32 bits of the field.
Appendix H gives the encodings of all fields in the VMCS.
The following describes the operation of VMREAD and VMWRITE based on processor
mode, VMCS-field width, and access type:
16-bit fields:
A VMREAD returns the value of the field in bits 15:0 of the destination
operand; other bits of the destination operand are cleared to 0.
A VMWRITE writes the value of bits 15:0 of the source operand into the VMCS
field; other bits of the source operand are not used.
32-bit fields:
A VMREAD returns the value of the field in bits 31:0 of the destination
operand; in 64-bit mode, bits 63:32 of the destination operand are cleared to
0.
A VMWRITE writes the value of bits 31:0 of the source operand into the VMCS
field; in 64-bit mode, bits 63:32 of the source operand are not used.
64-bit fields and natural-width fields using the full access type outside IA-32e
mode.
A VMREAD returns the value of bits 31:0 of the field in its destination
operand; bits 63:32 of the field are ignored.
A VMWRITE writes the value of its source operand to bits 31:0 of the field and
clears bits 63:32 of the field.
64-bit fields and natural-width fields using the full access type in 64-bit mode
(only on processors that support Intel 64 architecture).
A VMREAD returns the value of the field in bits 63:0 of the destination
operand
A VMWRITE writes the value of bits 63:0 of the source operand into the VMCS
field.
64-bit fields using the high access type.