Skip to content

smallkirby/ymir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ymir: The Type-1 Hypervisor

Zig

Lint Test

Ymir is an Intel VT-x based baremetal hypervisor written in Zig. It is minimalistic but can boot latest Linux kernel (v6.9).

Ymir Logo

Features

  • Supports Intel x64 architecture.
  • Can boot latest Linux kernel with initramfs.
  • Uses EPT (Extended Page Tables) for memory virtualization.
  • Super thin (passthrough) and minimalistic hypervisor.
  • No dependencty. Everything is written from scratch in Zig.

Limitations / Future Work

  • No support of SMP.
  • No support of APIC and other fundamental features.
  • Can boot only Linux kernel with x86 boot protocol.
  • Can host only one VM at a time.
  • And many more...

Requirements

Install ovmf package to run UEFI firmware on QEMU:

sudo apt install ovmf

Development

zig build run -Dlog_level=info -Doptimize=ReleaseFast

You need to put your kernel image (bzImage) and initramfs (initramfs.cpio) to /zig-out/img. It is tested that Ymir can boot Linux kernel v6.9 that is compiled with defconfig of x86-64.

About

Ymir: The Type-1 Hypervisor.

Resources

License

Stars

Watchers

Forks

Languages