{
  "id": "wire-format/vmcb",
  "family": "wire-format",
  "slug": "vmcb",
  "title": "VMCB (Virtual Machine Control Block, AMD-V)",
  "summary": "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.).",
  "kind": "wire-format",
  "aliases": [
    "VMCB (Virtual Machine Control Block, AMD-V)"
  ],
  "status": "standard",
  "verification": "verified",
  "tier": "B",
  "source_url": "https://en.wikipedia.org/wiki/X86_virtualization",
  "source_version": "retrieved 2026-05-29",
  "retrieved_date": "2026-05-29",
  "ext_type": "wire-format@1",
  "ext": {
    "spec": "AMD-V (SVM)",
    "summary": "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.).",
    "structure": [
      {
        "field": "Intercept controls",
        "size": "variable",
        "meaning": "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."
      },
      {
        "field": "ASID",
        "size": "2 bytes (uint16)",
        "meaning": "Address Space ID: tags TLB entries to avoid flushes on VM switch."
      },
      {
        "field": "TLB control",
        "size": "1 byte",
        "meaning": "0 = no flush, 1 = flush all, 2 = flush guest (ASID-tagged)."
      },
      {
        "field": "VINTR (Virtual Interrupt)",
        "size": "variable",
        "meaning": "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)."
      },
      {
        "field": "Nested paging (NPT)",
        "size": "enabled via EFER.SVME",
        "meaning": "Guest physical → host physical translation (like Intel EPT). Controlled by nested page table base address in VMCB."
      },
      {
        "field": "State save area",
        "size": "variable",
        "meaning": "Guest registers: ES, CS, SS, DS, GDTR, LDTR, IDTR, TR, CR0, CR2, CR3, CR4, DR6, DR7, RFLAGS, RIP, RSP, RAX, and more."
      },
      {
        "field": "VMCB clean bits",
        "size": "8 bytes (uint64)",
        "meaning": "Bitmap indicating which fields are clean (unchanged since last VMRUN). Avoids reloading unchanged fields."
      }
    ],
    "example_hex": "00 00 00 00 00 00 00 00",
    "example_decoded": "VMCB (placeholder)",
    "notes": [
      "VMCB is the AMD-V equivalent of Intel's VMCS.",
      "AMD-V uses VMRUN instruction to enter guest mode (vs Intel's VMLAUNCH/VMRESUME).",
      "Nested paging (NPT) is AMD's equivalent of Intel's EPT.",
      "ASID tags TLB entries to avoid flushes on VM switch.",
      "VMCB clean bits optimize VM entry/exit by skipping unchanged fields."
    ]
  },
  "updated": "2026-05-29"
}
