kvm: the Linux Virtual Machine Monitor

kvm: the Linux Virtual Machine Monitor

2007 | Avi Kivity, Yaniv Kamay, Dor Laor, Uri Lublin, Anthony Liguori
KVM is a Linux-based virtual machine monitor (VMM) that leverages x86 hardware virtualization extensions to enable the creation and execution of multiple virtual machines. These virtual machines appear as normal Linux processes and integrate seamlessly with the system. KVM is structured as a Linux character device, /dev/kvm, which allows userspace to create and run virtual machines through a set of ioctl() calls. The architecture of KVM includes a device node, memory management, and a guest execution loop that involves three levels: userspace, kernel, and hardware. The guest execution loop handles I/O instructions and external events, and the kernel manages the transition between guest and host modes. KVM addresses the challenge of virtualizing the memory management unit (MMU) by using shadow page tables. These tables track changes to guest memory and allow the kernel to manage translations between guest and host physical addresses. However, maintaining synchronization between the guest and shadow page tables is complex. To improve performance, KVM implements a virtual TLB (translation lookaside buffer) and caching mechanisms for the virtual MMU. KVM also virtualizes I/O operations, including guest-initiated I/O instructions and host-initiated virtual interrupts. It allows userspace to simulate I/O behavior and inject interrupts into the guest. Framebuffers are supported through memory-mapped I/O, allowing efficient handling of graphics devices. KVM is tightly integrated with Linux, providing benefits such as reusing existing kernel features like the scheduler and NUMA support. It supports live migration, allowing virtual machines to be moved between hosts with minimal disruption. KVM is also being extended to support SMP guests, paravirtualization, and new hardware virtualization features. It is currently implemented for x86 and x86-64 architectures, but can be extended to other architectures like PowerPC and IA-64. KVM provides a simple, integrated virtualization solution for Linux, leveraging the large Linux feature set and its rapid development. It is a powerful tool for virtualization, enabling efficient and flexible virtual machine management.KVM is a Linux-based virtual machine monitor (VMM) that leverages x86 hardware virtualization extensions to enable the creation and execution of multiple virtual machines. These virtual machines appear as normal Linux processes and integrate seamlessly with the system. KVM is structured as a Linux character device, /dev/kvm, which allows userspace to create and run virtual machines through a set of ioctl() calls. The architecture of KVM includes a device node, memory management, and a guest execution loop that involves three levels: userspace, kernel, and hardware. The guest execution loop handles I/O instructions and external events, and the kernel manages the transition between guest and host modes. KVM addresses the challenge of virtualizing the memory management unit (MMU) by using shadow page tables. These tables track changes to guest memory and allow the kernel to manage translations between guest and host physical addresses. However, maintaining synchronization between the guest and shadow page tables is complex. To improve performance, KVM implements a virtual TLB (translation lookaside buffer) and caching mechanisms for the virtual MMU. KVM also virtualizes I/O operations, including guest-initiated I/O instructions and host-initiated virtual interrupts. It allows userspace to simulate I/O behavior and inject interrupts into the guest. Framebuffers are supported through memory-mapped I/O, allowing efficient handling of graphics devices. KVM is tightly integrated with Linux, providing benefits such as reusing existing kernel features like the scheduler and NUMA support. It supports live migration, allowing virtual machines to be moved between hosts with minimal disruption. KVM is also being extended to support SMP guests, paravirtualization, and new hardware virtualization features. It is currently implemented for x86 and x86-64 architectures, but can be extended to other architectures like PowerPC and IA-64. KVM provides a simple, integrated virtualization solution for Linux, leveraging the large Linux feature set and its rapid development. It is a powerful tool for virtualization, enabling efficient and flexible virtual machine management.
Reach us at info@futurestudyspace.com
Understanding kvm %3A the Linux Virtual Machine Monitor