wire / wire-format / vmcb
The VMCB is the AMD-V equivalent of Intel's VMCS. It's a 4KB structure in guest memory. Fields: control area (intercept controls, ASID, TLB control, VINTR, etc.) and state save area (guest registers: ES, CS, SS, DS, GDTR, LDTR, IDTR, TR, CR0, CR2, CR3, CR4, DR6, DR7, RFLAGS, RIP, RSP, RAX, etc.).
aka: VMCB (Virtual Machine Control Block, AMD-V)
spec: AMD-V (SVM)
The VMCB is the AMD-V equivalent of Intel's VMCS. It's a 4KB structure in guest memory. Fields: control area (intercept controls, ASID, TLB control, VINTR, etc.) and state save area (guest registers: ES, CS, SS, DS, GDTR, LDTR, IDTR, TR, CR0, CR2, CR3, CR4, DR6, DR7, RFLAGS, RIP, RSP, RAX, etc.).
| field | size | meaning |
|---|---|---|
| Intercept controls | variable | Bitmap of events that cause VM exits: CR0-CR15 access, DR access, exception, interrupt, I/O, MSR, CPUID, INVD, WBINVD, INVLPG, INVLPGA, RDPMC, RDTSC, RDTSCP, VMRUN, VMMCALL, VMLOAD, VMSAVE, STGI, CLGI, SKINIT, RDTSC, etc. |
| ASID | 2 bytes (uint16) | Address Space ID: tags TLB entries to avoid flushes on VM switch. |
| TLB control | 1 byte | 0 = no flush, 1 = flush all, 2 = flush guest (ASID-tagged). |
| VINTR (Virtual Interrupt) | variable | Virtual interrupt control: V_TPR (task priority), V_IRQ (pending interrupt), V_INTR (virtual interrupt pending), V_IGN (ignore), V_INTR_PRIO (priority), V_INTR_MASKING (masking). |
| Nested paging (NPT) | enabled via EFER.SVME | Guest physical → host physical translation (like Intel EPT). Controlled by nested page table base address in VMCB. |
| State save area | variable | Guest registers: ES, CS, SS, DS, GDTR, LDTR, IDTR, TR, CR0, CR2, CR3, CR4, DR6, DR7, RFLAGS, RIP, RSP, RAX, and more. |
| VMCB clean bits | 8 bytes (uint64) | Bitmap indicating which fields are clean (unchanged since last VMRUN). Avoids reloading unchanged fields. |
example:
00 00 00 00 00 00 00 00
VMCB (placeholder)
agent: curl -H 'accept: application/json' wire.phall.io/wire-format/vmcb
or /wire-format/vmcb.json