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

Table Of Contents
Vol. 3 27-1
CHAPTER 27
VIRTUALIZATION OF SYSTEM RESOURCES
27.1 OVERVIEW
When a VMM is hosting multiple guest environments (VMs), it must monitor potential
interactions between software components using the same system resources. These
interactions can require the virtualization of resources. This chapter describes the
virtualization of system resources. These include: debugging facilities, address
translation, physical memory, and microcode update facilities.
27.2 VIRTUALIZATION SUPPORT FOR DEBUGGING
FACILITIES
The Intel 64 and IA-32 debugging facilities (see Chapter 18) provide breakpoint
instructions, exception conditions, register flags, debug registers, control registers
and storage buffers for functions related to debugging system and application soft-
ware. In VMX operation, a VMM can support debugging system and application soft-
ware from within virtual machines if the VMM properly virtualizes debugging
facilities. The following list describes features relevant to virtualizing these facilities.
The VMM can program the exception-bitmap (see Section 20.6.3) to ensure it
gets control on debug functions (like breakpoint exceptions occurring while
executing guest code such as INT3 instructions). Normally, debug exceptions
modify debug registers (such as DR6, DR7, IA32_DEBUGCTL). However, if debug
exceptions cause VM exits, exiting occurs before register modification.
The VMM may utilize the VM-entry event injection facilities described in Section
22.5 to inject debug or breakpoint exceptions to the guest. See Section 27.2.1
for a more detailed discussion.
The MOV-DR exiting control bit in the processor-based VM-execution control field
(see Section 20.6.2) can be enabled by the VMM to cause VM exits on explicit
guest access of various processor debug registers (for example, MOV to/from
DR0-DR7). These exits would always occur on guest access of DR0-DR7 registers
regardless of the values in CPL, DR4.DE or DR7.GD. Since all guest task switches
cause VM exits, a VMM can control any indirect guest access or modification of
debug registers during guest task switches.
Guest software access to debug-related model-specific registers (such as
IA32_DEBUGCTL MSR) can be trapped by the VMM through MSR access control
features (such as the MSR-bitmaps that are part of processor-based VM-
execution controls). See Section 26.10 for details on MSR virtualization.