Intel 64 and IA-32 Architectures Software Developers Manual Volume 2B, Instruction Set Reference, N-Z
5-10 Vol. 2B
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 22, “VM Entries,” in the Intel® 64 and IA-32 Architec-
tures Software Developer’s Manual, Volume 3B. Failure 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 (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
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.