background image

30-14 Vol. 3C

VMX INSTRUCTION REFERENCE

VMLAUNCH/VMRESUME—Launch/Resume Virtual Machine

Description

Effects a VM entry managed by the current VMCS.

VMLAUNCH fails if the launch state of current VMCS is not “clear”. If the instruction is successful, it sets the 
launch state to “launched.” 

VMRESUME fails if the launch state of the current VMCS is not “launched.”

If VM entry is attempted, the logical processor performs a series of consistency checks as detailed in Chapter 26, 
“VM Entries”. F
ailure to pass checks on the VMX controls or on the host-state area passes control to the instruction 
following the VMLAUNCH or VMRESUME instruction. If these pass but checks on the guest-state area fail, the logical 
processor loads state from the host-state area of the VMCS, passing control to the instruction referenced by the RIP 
field in the host-state area.
VM entry is not allowed when events are blocked by MOV SS or POP SS. Neither VMLAUNCH nor VMRESUME should 
be used immediately after either MOV to SS or POP to SS.

Operation

IF (not in VMX operation) or (CR0.PE = 0) or (RFLAGS.VM = 1) or (IA32_EFER.LMA = 1 and CS.L = 0)

THEN #UD;

ELSIF in VMX non-root operation

THEN VMexit;

ELSIF CPL

>

 0

THEN #GP(0);

ELSIF current-VMCS pointer is not valid

THEN VMfailInvalid;

ELSIF events are being blocked by MOV SS

THEN VMfailValid(VM entry with events blocked by MOV SS);

ELSIF (VMLAUNCH and launch state of current VMCS is not “clear”)

THEN VMfailValid(VMLAUNCH with non-clear VMCS);

ELSIF (VMRESUME and launch state of current VMCS is not “launched”)

THEN VMfailValid(VMRESUME with non-launched VMCS);
ELSE

Check settings of VMX controls and host-state area;
IF invalid settings

THEN VMfailValid(VM entry with invalid VMX-control field(s)) or

VMfailValid(VM entry with invalid host-state field(s)) or 
VMfailValid(VM entry with invalid executive-VMCS pointer)) or 
VMfailValid(VM entry with non-launched executive VMCS) or
VMfailValid(VM entry with executive-VMCS pointer not VMXON pointer) or
VMfailValid(VM entry with invalid VM-execution control fields in executive
VMCS)
as appropriate;

ELSE

Attempt to load guest state and PDPTRs as appropriate;
clear address-range monitoring;
IF failure in checking guest state or PDPTRs

THEN VM entry fails (see Section 26.7);

Opcode

Instruction

Description

0F 01 C2

VMLAUNCH

Launch virtual machine managed by current VMCS.

0F 01 C3

VMRESUME

Resume virtual machine managed by current VMCS.