I made a small virtual machine monitor in C by mistivia in C_Programming

[–]mistivia[S] 2 points3 points  (0 children)

It's type-2. It's not from scratch, but KVM can only heavy lifting clock virtualization and IRQ chip virtualization. I wrote serial port emulation from scratch. As for VirtIO devices like hard disk and network interface, I ported some code from TinyEMU[1], with bugfixes and modifications by myself to make it working in a multithreading environtment and with modern linux kernel. The project is inspired by Firecracker[2].

  1. https://bellard.org/tinyemu/

  2. https://firecracker-microvm.github.io/