Intel 64 and IA-32 Architectures Software Developers Manual Volume 2B, Instruction Set Reference, N-Z

5-4 Vol. 2B
VMX INSTRUCTION REFERENCE
VMCALL—Call to VM Monitor
Description
This instruction allows guest software can make a call for service into an underlying
VM monitor. The details of the programming interface for such calls are VMM-specific;
this instruction does nothing more than cause a VM exit, registering the appropriate
exit reason.
Use of this instruction in VMX root operation invokes an SMM monitor (see Section
24.16.2 in IA-32 Intel Architecture Software Developer’s Manual, Volume 3B). This
invocation will activate the dual-monitor treatment of system-management interrupts
(SMIs) and system-management mode (SMM) if it is not already active (see Section
24.16.6 in IA-32 Intel Architecture Software Developer’s Manual, Volume 3B).
Operation
IF not in VMX operation
THEN #UD;
ELSIF in VMX non-root operation
THEN VM exit;
ELSIF in SMM or if the valid bit in the IA32_SMM_MONITOR_CTL MSR is clear
THEN VMfail(VMCALL executed in VMX root operation);
ELSIF (RFLAGS.VM = 1) OR (IA32_EFER.LMA = 1 and CS.L = 0)
THEN #UD;
ELSIF CPL > 0
THEN #GP(0);
ELSIF dual-monitor treatment of SMIs and SMM is active
THEN perform an SMM VM exit (see Section 24.16.2
of the Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 3B);
ELSIF current-VMCS pointer is not valid
THEN VMfailInvalid;
ELSIF launch state of current VMCS is not clear
THEN VMfailValid(VMCALL with non-clear VMCS);
ELSIF VM-exit control fields are not valid (see Section 24.16.6.1 of the Intel® 64 and IA-32 Archi-
tectures Software Developer’s Manual, Volume 3B)
THEN VMfailValid(VMCALL with invalid VM-exit control fields);
ELSE
enter SMM;
read revision identifier in MSEG;
IF revision identifier does not match that supported by processor
THEN
Opcode Instruction Description
0F 01 C1 VMCALL Call to VM monitor by causing VM exit.