vmfunc
Virtual Machine Function
VMFUNC
Invoke VM function specified in EAX.
Details
Invokes a VM function as specified by the function number in EAX and additional parameters in ECX. Only valid in VMX non-root operation (guest mode) and transitions control to the host via VM exit. Privilege level: VMX non-root; will raise #UD if not in VMX operation or if called in root mode.
Pseudocode Operation
FUNC_NUM ← EAX
FUNC_PARAM ← ECX
INVOKE_VMFUNCTION(FUNC_NUM, FUNC_PARAM)
VMEXIT_TO_HOST
Example
VMFUNC
Encoding
Binary Layout
0F
+0
01
+1
D4
+2
Operands
Reference (Intel® SDM)
Instruction Forms
| Opcode | Instruction | Op/En | 64/32-bit Mode | CPUID | Description |
|---|---|---|---|---|---|
| NP 0F 01 D4 | VMFUNC | ZO | Invoke VM function specified in EAX. |
Description
This instruction allows software in VMX non-root operation to invoke a VM function, which is processor functionality enabled and configured by software in VMX root operation. The value of EAX selects the specific VM function being invoked.
The behavior of each VM function (including any additional fault checking) is specified in Section 28.5.7,
“VM Functions.”
Operation
Perform functionality of the VM function specified in EAX;
Flags Affected
Depends on the VM function specified in EAX. See Section 28.5.7, “VM Functions.” Protected Mode Exceptions (not including those defined by specific VM functions) #UD If executed outside VMX non-root operation. If “enable VM functions” VM-execution control is 0. If EAX ≥ 64.
Exceptions
Real-Address Mode Exceptions
Same exceptions as in protected mode.
Virtual-8086 Exceptions
Same exceptions as in protected mode.
Compatibility Mode Exceptions
Same exceptions as in protected mode.
64-Bit Mode Exceptions
Same exceptions as in protected mode.
VMFUNC—Invoke VM function 33-13 Vol. 3C