Skip to content

VMI APIs

Mathieu Tarral edited this page Aug 4, 2019 · 6 revisions

This page summarize the state of VMI API currently provided by the hypervisors

Xen

VMI APIs are available upstream since Xen 4.1

  • https://wiki.xenproject.org/wiki/Virtual_Machine_Introspection

  • VMI APIs can be found in xenctrl.h

  • Accessing the VM's hardware state

    • get number of VCPUs: ✅
    • get maximum gfn: ✅
    • pause/resume: ✅
    • r/w physical memory: ✅
    • r/w virtual memory: ✅
    • r/w VCPU registers: ✅
  • Intercept VM's hardware events

    • control registers: ✅
    • extended control registers: ✅
    • debug registers: ✅
    • MSR: ✅
    • singlesteps: ✅
    • interrupts: ✅
    • descriptors: ✅
    • hypercalls: ✅
    • CPUID: ✅
    • memory: ✅
    • alternate SLAT: ✅
  • Utilities:

    • foreign mapping: ✅
    • exception injection: ✅

KVM

VMI APIs are currently being developed by BitDefender, and in review on the mailing list.

  • https://github.com/KVM-VMI/kvm-vmi

  • libkvmi.h

  • kvmi.h

  • Accessing the VM's hardware state

    • get number of VCPUs: ✅
    • get maximum gfn: ❌
    • pause/resume: ✅
    • r/w physical memory: ✅
    • r/w virtual memory: ❌
    • r/w VCPU registers: ✅
  • Intercept VM's hardware events

    • control registers: ✅
    • extended control registers: ❌
    • debug registers: ✅
    • MSR: ✅
    • singlesteps: ❌
    • interrupts: ✅
    • descriptors: ✅
    • hypercalls: ✅
    • CPUID: ❌
    • memory: ✅
    • alternate SLAT: ❌
  • Utilities:

    • foreign mapping: ✅
    • exception injection: ✅

Note:

  • SLAT: Second Level Address Translation
Clone this wiki locally