semu: a minimalist RISC-V system emulator capable of running Linux kernel

Posted: Oct 1st 2024

semu is a minimalist RISC-V system emulator capable of running Linux the kernel and corresponding userland. semu implements the following:

  • RISC-V instruction set architecture: RV32IMA
  • Privilege levels: S and U modes
  • Control and status registers (CSR)
  • Virtual memory system: RV32 MMU
  • UART: 8250/16550
  • PLIC (platform-level interrupt controller): 32 interrupts, no priority
  • Standard SBI, with the timer extension

My contributions include the virtualization of several hardware components:

  • VirtIO Block: Emulates block storage devices, allowing the guest OS to mount and access disk images
  • VirtIO GPU: Emulates a graphics device supporting X11, Mesa3D, DirectFB, etc.
  • VirtIO Input: Emulates input devices such as mouse and keyboard for interactive use
  • VirtIO Entropy: Emulates a random number generator (RNG), supplying entropy required by many software components to operate correctly (e.g., system libraries, cryptographic routines, networking tools)

VirtIO GPU with 3D acceleration through VirGL:

Talk at Open Source Summit North America 2026

Slides of our talk, "Demystifying VirtIO-GPU: Building a Graphics Virtualization Bridge From Scratch", at Open Source Summit North America 2026:

Talk at COSCUP 2026

Slides of my talk, "The Illusion of Hardware: How Modern Virtual Machines Work", at COSCUP 2026:

Last Updated on Nov 2nd 2026