https://github.com/jserv/kvm-user-x86
A simple userspace program to interact with Linux KVM
https://github.com/jserv/kvm-user-x86
Last synced: about 1 year ago
JSON representation
A simple userspace program to interact with Linux KVM
- Host: GitHub
- URL: https://github.com/jserv/kvm-user-x86
- Owner: jserv
- Created: 2016-01-07T07:48:00.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-08-04T00:58:25.000Z (almost 3 years ago)
- Last Synced: 2025-06-24T18:59:27.627Z (about 1 year ago)
- Language: C
- Size: 4.88 KB
- Stars: 23
- Watchers: 4
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
A simple userspace program to interact with Linux KVM on x86 hardware containing virtualization extensions (Intel VT or AMD-V).
The work was derived from [this article](http://soulxu.github.io/blog/2014/08/11/use-kvm-api-write-emulator/).
## Prerequisites
* Intel processor with VT (virtualization technology) extensions or AMD processor with SVM extensions (also called AMD-V)
- Enable VT or AMD in advance.
* Install Linux kernel headers
```
sudo apt-get install linux-headers-generic
```
## Build
Simply execute GNU `make`:
```
make
```
There are two files generated:
* `kvm-user`
* `vm.bin`
## Run
* Enable [KVM](http://www.linux-kvm.org/):
```
sudo modprobe kvm
```
* Execute `kvm-user`
```
./kvm-user
```
Sample output:
```
KVM start run
KVM_EXIT_IO
out port: 0x10, data 0
KVM start run
KVM_EXIT_IO
out port: 0x10, data 1
KVM start run
KVM_EXIT_IO
out port: 0x10, data 2
KVM start run
KVM_EXIT_IO
out port: 0x10, data 3
```