« All posts

How Linux Executes a Virtual Machine Process

Explore the programming model of KVM and how Linux handles virtual machines.

A visual explainer details the programming model behind KVM. A virtual CPU operates as a host thread invoking KVM_RUN, with guest RAM mapped into the process. Execution returns to userspace when the guest triggers a VM exit. The discussion also includes /dev/kvm, hardware virtualization, EPT/NPT, QEMU, virtio, and vhost.