https://github.com/smallkirby/ymir
Ymir: The Type-1 Hypervisor.
https://github.com/smallkirby/ymir
hypervisor zig
Last synced: 24 days ago
JSON representation
Ymir: The Type-1 Hypervisor.
- Host: GitHub
- URL: https://github.com/smallkirby/ymir
- Owner: smallkirby
- License: mit
- Created: 2024-08-10T11:35:16.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-06-18T10:25:44.000Z (8 months ago)
- Last Synced: 2025-11-05T18:30:41.592Z (3 months ago)
- Topics: hypervisor, zig
- Language: Zig
- Homepage: https://hv.smallkirby.com
- Size: 813 KB
- Stars: 47
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Ymir: The Type-1 Hypervisor




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

## 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](https://www.kernel.org/doc/html/v6.1/x86/boot.html).
- Can host only one VM at a time.
- And many more...
## Requirements
Install `ovmf` package to run UEFI firmware on QEMU:
```sh
sudo apt install ovmf
```
## Development
```sh
zig build install-samples
zig build run -Dlog_level=info -Doptimize=ReleaseFast
```
If you want to use your own kernel image and initramfs,
you can 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.