Instruction
VMXON
Puts the processor in VMX operation, taking the physical address of a 4-KByte VMXON region from a 64-bit memory operand.
- Extensions
- Forms
- 1 (1 Legacy)
- Data
- Intel XED v2026.08.23
Forms
| Instruction | Encoding | Requires |
|---|---|---|
VMXON m64
VMXON_MEMq | F3 0F C7 /6 | VMX |
Operation
What the forms do, in pseudocode that our tests run against results recorded on real processors. How to read.
if not cr4 >> 13 & 1:
fault(UD) # CR4.VMXE clear: VMX off (and on
# AMD's processors, which have no
# VMX)
if not in_vmx:
fc = msr[IA32_FEATURE_CONTROL]
on = fc >> (1 if in_smx else 2) & 1
a0 = msr[IA32_VMX_CR0_FIXED0] # bits that must be 1
a1 = msr[IA32_VMX_CR0_FIXED1] # bits that may be 1
b0 = msr[IA32_VMX_CR4_FIXED0]
b1 = msr[IA32_VMX_CR4_FIXED1]
bad = cr0 & a0 != a0 or cr0 & ~a1
if cr4 & b0 != b0 or cr4 & ~b1:
bad = 1
if CPL > 0 or bad:
fault(GP, 0)
if not fc & 1 or not on:
fault(GP, 0) # the firmware left the MSR open
# (bit 0, lock) or VMX off: bit 1 in
# SMX operation, bit 2 outside
p = src.read() # a physical address
basic = msr[IA32_VMX_BASIC]
rev = basic & 0x7FFFFFFF # the VMCS revision identifier
w = maxphyaddr # the physical-address width, or 32
if basic >> 48 & 1: # bits where IA32_VMX_BASIC[48]
w = 32 # says so
if p & 0xFFF or p >> w:
vm_fail_invalid()
elif phys_read(p, 32) != rev:
vm_fail_invalid() # another revision identifier, or
# bit 31 set
else:
in_vmx = 1 # INIT blocked, A20M off, address
vmxon_ptr = p # monitoring cleared
current_vmcs = NO_VMCS
vm_succeed()
elif vmx_nonroot:
vm_exit(27) # the hypervisor emulates it
elif CPL > 0:
fault(GP, 0)
else:
vm_fail(15) # in VMX root operation already
Run on AMD Zen 5 (EPYC 9645): 2 cases. Its cases ran where CPUID reported no VMX, and every one raised an exception.
Operands
| Operand | Kind | Action |
|---|---|---|
VMXON m64 | ||
m64 | explicit | read |
RFLAGS | implicit | write |
Flags
| OF | SF | ZF | AF | PF | CF |
|---|---|---|---|---|---|
| All forms | |||||
| 0 | 0 | M | 0 | 0 | M |
Attributes
What else XED records about the forms. How to read.
- All forms
- privileged: CPL 0 only; not in real-address mode; may abort a TSX transaction
CPUID and processors
Each form belongs to an XED ISA set. A form can be used when the processor reports every CPUID bit of one of its ISA set's alternatives.
| ISA set | CPUID | Processors |
|---|---|---|
VTX | VMX | Core (Merom, Conroe), Penryn, Nehalem, Westmere, Sandy Bridge, Ivy Bridge, Haswell, Broadwell, Skylake, Comet Lake, Cannon Lake, Ice Lake (client), Tiger Lake, Alder Lake, Arrow Lake, Panther Lake, Nova Lake, Skylake-SP, Cascade Lake, Cooper Lake, Ice Lake (server), Sapphire Rapids, Emerald Rapids, Granite Rapids, Diamond Rapids, Bonnell, Saltwell, Silvermont, Goldmont, Goldmont Plus, Tremont, Snow Ridge, Lakefield, Sierra Forest, Clearwater Forest, Knights Landing, Knights Mill Note: XED's AMD chips, which it derives from its Intel chips, have VMX too; AMD processors implement AMD-V (SVM) instead, so this list leaves them out. |
More VMX instructions
Sources
- Intel XED v2026.08.23 (commit
0bcb6237345c): forms, encodings, operands, flags, exception classes, attributes, ISA sets, CPUID bits and chip model. - Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 3 (325384-093, September 2026): Volume 3C, page 33-28 (VMXON)
The tables are derived from Intel XED, Copyright Intel Corporation, licensed under the Apache License 2.0; x86-64.net converted and reformatted them. The text is our own.