百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
K

kvm-kernel-example

> 编程语言
开源

示例: 学习 KVM - 实现自己的内核

384 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

示例: 学习 KVM - 实现自己的内核

KVM-Kernel Example

The source code are examples on my blog: Learning KVM - implement your own kernel.

I've described how to implement a KVM-based hypervisor and the key points to implement a kernel on my blog. You can leave comments in the blog or file issues here if you have questions or find any bug.

Dir

Hypervisor

The KVM-based hypervisor, its role is like qemu-system.

Kernel

A extremely simple kernel, supports few syscalls.

User

Simple ELF(s) for testing our kernel. Pre-built user program was provided, and you can re-generate by the following commands:

bash
$ pip3 install pwntools
$ user/gen.py

NOTE: You have to install Python 3.x in advance.

Setup

Check KVM support

Check if your CPU supports virtualization:

$ egrep '(vmx|svm)' /proc/cpuinfo

NOTE: CPUs in a VM might not support virtualization (i.e. no nested virtualization). For example, EC2 on AWS doesn't support using KVM.

Install KVM device

Check if the KVM device exists:

$ ls -la /dev/kvm

If /dev/kvm is not found, you can enable it (on Ubuntu) with:

$ sudo apt install qemu-kvm

If you are not root, you need to add yourself into the kvm group to have permission for accessing /dev/kvm.

$ sudo usermod -a -G kvm `whoami`

Remember to logout and login to have the group changing effective.

How to run

…

Environment

I only tested the code on Ubuntu 18.04, but I expect it to work on all KVM-supported x86 Linux distributions. Please file an issue if you find it's not true.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Ckernelkvmkvm-hypervisorlinux-kernel

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言