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

Table Of Contents
Vol. 3 26-1
CHAPTER 26
VIRTUAL-MACHINE MONITOR PROGRAMMING
CONSIDERATIONS
26.1 VMX SYSTEM PROGRAMMING OVERVIEW
The Virtual Machine Monitor (VMM) is a software class used to manage virtual
machines (VM). This chapter describes programming considerations for VMMs.
Each VM behaves like a complete physical machine and can run operating system
(OS) and applications. The VMM software layer runs at the most privileged level and
has complete ownership of the underlying system hardware. The VMM controls
creation of a VM, transfers control to a VM, and manages situations that can cause
transitions between the guest VMs and host VMM. The VMM allows the VMs to share
the underlying hardware and yet provides isolation between the VMs. The guest soft-
ware executing in a VM is unaware of any transitions that might have occurred
between the VM and its host.
26.2 SUPPORTING PROCESSOR OPERATING MODES IN
GUEST ENVIRONMENTS
Typically, VMMs transfer control to a VM using VMX transitions referred to as VM
entries. The boundary conditions that define what a VM is allowed to execute in isola-
tion are specified in a virtual-machine control structure (VMCS).
As noted in Section 19.8, processors may fix certain bits in CR0 and CR4 to specific
values and not support other values. The first processors to support VMX operation
require that CR0.PE and CR0.PG be 1 in VMX operation. Thus, a VM entry is allowed
only to guests with paging enabled that are in protected mode or in virtual-8086
mode. Guest execution in other processor operating modes need to be specially
handled by the VMM.
One example of such a condition is guest execution in real-mode. A VMM could
support guest real-mode execution using at least two approaches:
By using a fast instruction set emulator in the VMM.