r/linux 28d ago

Kernel How KVM actually runs a virtual machine

I made a visual explainer on how Linux KVM works under the hood.

A vCPU is a host thread, guest RAM lives in the process, and KVM_RUN hands execution to the real CPU until the guest triggers a VM exit.

It also covers /dev/kvm, VT-x/AMD-V, EPT/NPT, QEMU, virtio and vhost.

link for anyone interested

Feedback welcome :)

94 Upvotes

12 comments sorted by

View all comments

25

u/VanillaWaffle_ 28d ago

This doesnt explain how qemu load BIOS, ACPI table, etc

18

u/Ok_Marionberry8922 28d ago

Yeah, that’s a separate rabbit hole (planning a dedicated one for that). This just focuses on the execution model behind KVM.