background image

24-26 Vol. 3C

VIRTUAL MACHINE CONTROL STRUCTURES

— A value of 2 indicates a 32-bit field.
— A value of 3 indicates a natural-width field. Such fields have 64 bits on processors that support Intel 64 

architecture and 32 bits on processors that do not.

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 VM-exit information. 
(The last category also includes 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 B 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.
— A VMREAD returns the value of bits 63:32 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 to bits 63:32 of the field; in 64-bit mode, 

bits 63:32 of the source operand are not used.

Software seeking to read a 64-bit field outside IA-32e mode can use VMREAD with the full access type (reading 
bits 31:0 of the field) and VMREAD with the high access type (reading bits 63:32 of the field); the order of the two 
VMREAD executions is not important. Software seeking to modify a 64-bit field outside IA-32e mode should first 
use VMWRITE with the full access type (establishing bits 31:0 of the field while clearing bits 63:32) and then use 
VMWRITE with the high access type (establishing bits 63:32 of the field).