Instruction
VMSAVE
Saves the processor state that VMRUN does not save to the VMCB at the physical address in rAX; AMD SVM.
AMD's virtualization extension: Intel processors implement VMX instead.
- Extensions
- Forms
- 1 (1 Legacy)
- Data
- Intel XED v2026.08.23
Forms
| Instruction | Encoding | Requires |
|---|---|---|
VMSAVE
VMSAVE | 0F 01 DB | SVM |
Operation
What the forms do, in pseudocode that our tests run against results recorded on real processors. How to read.
if not efer >> 12 & 1:
fault(UD) # EFER.SVME clear: SVM off
if CPL > 0:
fault(GP, 0)
if intercepted(0x83):
vm_exit(0x83) # in a guest: to its hypervisor
a = rax # the VMCB's physical address (EAX
# with a 67 prefix)
if a & 0xFFF or a >> maxphyaddr:
fault(GP, 0)
vmcb_save_segments(a) # FS, GS, LDTR and TR, each with
# its hidden parts
phys_write(a + 0x600, 64, star)
phys_write(a + 0x608, 64, lstar)
phys_write(a + 0x610, 64, cstar)
phys_write(a + 0x618, 64, fmask)
phys_write(a + 0x620, 64, kernel_gs_base)
phys_write(a + 0x628, 64, sysenter_cs)
phys_write(a + 0x630, 64, sysenter_esp)
phys_write(a + 0x638, 64, sysenter_eip)Run on AMD Zen 5 (EPYC 9645): 2 cases. Every one raised an exception, at CPL 3, where the probe runs.
Operands
None: XED lists no operands for this form.
Flags
None: XED records no flag that the forms test or change.
Attributes
What else XED records about the forms. How to read.
- All forms
- not in real-address mode
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.
More SVM instructions
Sources
- Intel XED v2026.08.23 (commit
0bcb6237345c): forms, encodings, operands, flags, exception classes, attributes, ISA sets, CPUID bits and chip model. - The CPU data of x86-64.net: Zen 3 to Zen 6, from GCC’s
-marchfeature sets and AMD’s Processor Programming References, which the page of each processor cites. - AMD64 Architecture Programmer's Manual, Volume 3: General-Purpose and System Instructions (24594, rev. 3.36, March 2024), Wayback Machine copy of AMD's PDF
- AMD64 Architecture Programmer's Manual, Volume 2: System Programming (24593, rev. 3.42, March 2024), Wayback Machine copy of AMD's PDF
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.