background image

Vol. 3C 25-3

VMX NON-ROOT OPERATION

LGDT, LIDT, LLDT, LTR, SGDT, SIDT, SLDT, STR. These instructions cause VM exits if the “descriptor-table 
exiting” VM-execution control is 1.

LMSW. In general, the LMSW instruction causes a VM exit if it would write, for any bit set in the low 4 bits of 
the CR0 guest/host mask, a value different than the corresponding bit in the CR0 read shadow. LMSW never 
clears bit 0 of CR0 (CR0.PE); thus, LMSW causes a VM exit if either of the following are true:
— The bits in position 0 (corresponding to CR0.PE) are set in both the CR0 guest/mask and the source 

operand, and the bit in position 0 is clear in the CR0 read shadow.

— For any bit position in the range 3:1, the bit in that position is set in the CR0 guest/mask and the values of 

the corresponding bits in the source operand and the CR0 read shadow differ.

MONITOR. The MONITOR instruction causes a VM exit if the “MONITOR exiting” VM-execution control is 1.

MOV from CR3. The MOV from CR3 instruction causes a VM exit if the “CR3-store exiting” VM-execution 
control is 1. The first processors to support the virtual-machine extensions supported only the 1-setting of this 
control.

MOV from CR8. The MOV from CR8 instruction causes a VM exit if the “CR8-store exiting” VM-execution 
control is 1.

MOV to CR0. The MOV to CR0 instruction causes a VM exit unless the value of its source operand matches, for 
the position of each bit set in the CR0 guest/host mask, the corresponding bit in the CR0 read shadow. (If every 
bit is clear in the CR0 guest/host mask, MOV to CR0 cannot cause a VM exit.)

MOV to CR3. The MOV to CR3 instruction causes a VM exit unless the “CR3-load exiting” VM-execution control 
is 0 or the value of its source operand is equal to one of the CR3-target values specified in the VMCS. If the 
CR3-target count in n, only the first n CR3-target values are considered; if the CR3-target count is 0, MOV to 
CR3 always causes a VM exit.
The first processors to support the virtual-machine extensions supported only the 1-setting of the “CR3-load
exiting” VM-execution control. These processors always consult the CR3-target controls to determine whether
an execution of MOV to CR3 causes a VM exit.

MOV to CR4. The MOV to CR4 instruction causes a VM exit unless the value of its source operand matches, for 
the position of each bit set in the CR4 guest/host mask, the corresponding bit in the CR4 read shadow.

MOV to CR8. The MOV to CR8 instruction causes a VM exit if the “CR8-load exiting” VM-execution control is 1.

MOV DR. The MOV DR instruction causes a VM exit if the “MOV-DR exiting” VM-execution control is 1. Such 
VM exits represent an exception to the principles identified in Section 25.1.1 in that they take priority over the 
following: general-protection exceptions based on privilege level; and invalid-opcode exceptions that occur 
because CR4.DE=1 and the instruction specified access to DR4 or DR5.

MWAIT. The MWAIT instruction causes a VM exit if the “MWAIT exiting” VM-execution control is 1. If this 
control is 0, the behavior of the MWAIT instruction may be modified (see Section 25.3).

PAUSE. The behavior of each of this instruction depends on CPL and the settings of the “PAUSE exiting” and 
“PAUSE-loop exiting” VM-execution controls:
— CPL =  0.

If the “PAUSE exiting” and “PAUSE-loop exiting” VM-execution controls are both 0, the PAUSE 

instruction executes normally.

If the “PAUSE exiting” VM-execution control is 1, the PAUSE instruction causes a VM exit (the “PAUSE-

loop exiting” VM-execution control is ignored if CPL = 0 and the “PAUSE exiting” VM-execution control 
is 1).

If the “PAUSE exiting” VM-execution control is 0 and the “PAUSE-loop exiting” VM-execution control is 

1, the following treatment applies.

The processor determines the amount of time between this execution of PAUSE and the previous 
execution of PAUSE at CPL 0. If this amount of time exceeds the value of the VM-execution control field 
PLE_Gap, the processor considers this execution to be the first execution of PAUSE in a loop. (It also 
does so for the first execution of PAUSE at CPL 0 after VM entry.)
Otherwise, the processor determines the amount of time since the most recent execution of PAUSE that 
was considered to be the first in a loop. If this amount of time exceeds the value of the VM-execution 
control field PLE_Window, a VM exit occurs.