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

Table Of Contents
26-18 Vol. 3
VIRTUAL-MACHINE MONITOR PROGRAMMING CONSIDERATIONS
or not available is referred to as a 32-bit VMM. The type of guest operations such
VMMs support are summarized in Table 26-1.
A VM exit may occur to an IA-32e mode guest in either 64-bit sub-mode or compati-
bility sub-mode of IA-32e mode. VMMs may resume guests in either mode. The sub-
mode in which an IA-32e mode guest resumes VMX non-root operation is determined
by the attributes of the code segment which experienced the VM exit. If CS.L = 1,
the guest is executing in 64-bit mode; if CS.L = 0, the guest is executing in compat-
ibility mode (see Section 26.9.5).
Not all of an IA-32e mode VMM must run in 64-bit mode. While some parts of an
IA-32e mode VMM must run in 64-bit mode, there are only a few restrictions
preventing a VMM from executing in compatibility mode. The most notable restriction
is that most VMX instructions cause exceptions when executed in compatibility mode.
26.9.2 Handling Widths of VMCS Fields
Individual VMCS control fields must be accessed using VMREAD or VMWRITE instruc-
tions. Outside of 64-Bit mode, VMREAD and VMWRITE operate on 32 bits of data. The
widths of VMCS control fields may vary depending on whether a processor supports
Intel 64 architecture.
Many VMCS fields are architected to extend transparently on processors supporting
Intel 64 architecture (64 bits on processors that support Intel 64 architecture, 32 bits
on processors that do not). Some VMCS fields are 64-bits wide regardless of whether
the processor supports Intel 64 architecture or is in IA-32e mode.
26.9.2.1 Natural-Width VMCS Fields
Many VMCS fields operate using natural width. Such fields return (on reads) and set
(on writes) 32-bits when operating in 32-bit mode and 64-bits when operating in
64-bit mode. For the most part, these fields return the naturally expected data
widths. The “Guest RIP” field in the VMCS guest-state area is an example of this type
of field.
26.9.2.2 64-Bit VMCS Fields
Unlike natural width fields, these fields are fixed to 64-bit width on all processors.
When in 64-bit mode, reads of these fields return 64-bit wide data and writes to
Table 26-1. Operating Modes for Host and Guest Environments
Capability Guest Operation
in IA-32e mode
Guest Operation
Not Requiring IA-32e Mode
IA-32e mode VMM Yes Yes
32-bit VMM Not supported Yes