Name Date Size #Lines LOC

..--

Documentation/H--427352

arm/H--4,0182,833

config/H--414359

disk/H--2,2231,655

guest/H--8562

hw/H--1,8061,386

include/H--10,7476,527

mips/H--964634

net/uip/H--1,351938

powerpc/H--3,7472,499

riscv/H--3,1402,411

tests/H--247186

ui/H--903714

util/H--2,6521,870

vfio/H--2,1331,550

virtio/H--6,8495,415

x86/H--4,1372,958

.gitignoreH A D17-May-2016204 1716

COPYINGH A D21-Jan-201517.6 KiB342281

CREDITS-GitH A D08-Apr-2011603 3125

INSTALLH A D22-Jul-20224.5 KiB11195

MakefileH A D18-Nov-202315.4 KiB618500

READMEH A D02-Aug-20193.4 KiB12082

builtin-balloon.cH A D24-Oct-20121.6 KiB8163

builtin-debug.cH A D22-Jul-20122.2 KiB11187

builtin-help.cH A D17-Dec-20111.3 KiB6449

builtin-list.cH A D06-Feb-20132.7 KiB156119

builtin-pause.cH A D27-Dec-20111.6 KiB8968

builtin-resume.cH A D27-Dec-20111.7 KiB8968

builtin-run.cH A D07-Sep-202321.7 KiB871692

builtin-sandbox.cH A D05-Dec-2011210 107

builtin-setup.cH A D07-Jul-20235.5 KiB286226

builtin-stat.cH A D20-May-20223.3 KiB143120

builtin-stop.cH A D20-Dec-20111.3 KiB7154

builtin-version.cH A D10-Aug-2011291 1612

code16gcc.hH A D08-Jul-2010388 163

devices.cH A D24-Apr-20202 KiB9475

epoll.cH A D06-Jun-20231.8 KiB9272

framebuffer.cH A D17-Sep-20121.3 KiB8159

guest_compat.cH A D07-Jul-20231.5 KiB10069

ioeventfd.cH A D06-Jun-20233.2 KiB157118

irq.cH A D18-Jun-20184.5 KiB210162

kvm-cmd.cH A D19-Dec-20112.4 KiB9268

kvm-cpu.cH A D07-Jul-20237 KiB336245

kvm-ipc.cH A D06-Jun-202310.2 KiB512379

kvm.cH A D16-Jun-202213.5 KiB620481

main.cH A D16-Oct-2011387 2013

mmio.cH A D07-Jul-20235.6 KiB246182

pci.cH A D16-Sep-202313.5 KiB540369

symbol.cH A D17-Sep-20122.2 KiB13498

term.cH A D13-Apr-20174 KiB214159

README

1Native Linux KVM tool
2=====================
3
4kvmtool is a lightweight tool for hosting KVM guests. As a pure virtualization
5tool it only supports guests using the same architecture, though it supports
6running 32-bit guests on those 64-bit architectures that allow this.
7
8From the original announcement email:
9-------------------------------------------------------
10The goal of this tool is to provide a clean, from-scratch, lightweight
11KVM host tool implementation that can boot Linux guest images (just a
12hobby, won't be big and professional like QEMU) with no BIOS
13dependencies and with only the minimal amount of legacy device
14emulation.
15
16It's great as a learning tool if you want to get your feet wet in
17virtualization land: it's only 5 KLOC of clean C code that can already
18boot a guest Linux image.
19
20Right now it can boot a Linux image and provide you output via a serial
21console, over the host terminal, i.e. you can use it to boot a guest
22Linux image in a terminal or over ssh and log into the guest without
23much guest or host side setup work needed.
24--------------------------
25
26This is the stand-alone version which does not live inside a Linux
27kernel tree.
281. To check it out, clone the main git repository:
29
30  git clone git://git.kernel.org/pub/scm/linux/kernel/git/will/kvmtool.git
31
322. Compile the tool (for more elaborate instructions see INSTALL):
33
34  cd kvmtool && make
35
363. Download a raw userspace image:
37
38  wget http://wiki.qemu.org/download/linux-0.2.img.bz2 && bunzip2
39linux-0.2.img.bz2
40
414. The guest kernel has to be built with the following configuration:
42
43 - For the default console output:
44	CONFIG_SERIAL_8250=y
45	CONFIG_SERIAL_8250_CONSOLE=y
46
47 - For running 32bit images on 64bit hosts:
48	CONFIG_IA32_EMULATION=y
49
50 - Proper FS options according to image FS (e.g. CONFIG_EXT2_FS, CONFIG_EXT4_FS).
51
52 - For all virtio devices listed below:
53	CONFIG_VIRTIO=y
54	CONFIG_VIRTIO_RING=y
55	CONFIG_VIRTIO_PCI=y
56
57 - For virtio-blk devices (--disk, -d):
58	CONFIG_VIRTIO_BLK=y
59
60 - For virtio-net devices ([--network, -n] virtio):
61	CONFIG_VIRTIO_NET=y
62
63 - For virtio-9p devices (--virtio-9p):
64	CONFIG_NET_9P=y
65	CONFIG_NET_9P_VIRTIO=y
66	CONFIG_9P_FS=y
67
68 - For virtio-balloon device (--balloon):
69	CONFIG_VIRTIO_BALLOON=y
70
71 - For virtio-console device (--console virtio):
72	CONFIG_VIRTIO_CONSOLE=y
73
74 - For virtio-rng device (--rng):
75	CONFIG_HW_RANDOM_VIRTIO=y
76
77 - For vesa device (--sdl or --vnc):
78	CONFIG_FB_VESA=y
79
80
815. And finally, launch the hypervisor:
82
83  ./lkvm run --disk linux-0.2.img \
84	    --kernel ../../arch/x86/boot/bzImage \
85or
86
87  sudo ./lkvm run --disk linux-0.2.img \
88		 --kernel ../../arch/x86/boot/bzImage \
89		 --network virtio
90
91The tool has been written by Pekka Enberg, Cyrill Gorcunov, Asias He,
92Sasha Levin and Prasad Joshi. Special thanks to Avi Kivity for his help
93on KVM internals and Ingo Molnar for all-around support and encouragement!
94
95See the following thread for original discussion for motivation of this
96project:
97
98http://thread.gmane.org/gmane.linux.kernel/962051/focus=962620
99
100Another detailed example can be found in the lwn.net article:
101
102http://lwn.net/Articles/658511/
103
104Contributing
105------------
106
107Please send patches for kvmtool to kvm@vger.kernel.org, in the usual git
108patch format, including "kvmtool" in the mail subject. "kvmtool" can be
109added automatically by issuing the command
110
111 git config format.subjectprefix "PATCH kvmtool"
112
113in the git repository.
114
115Maintainers
116-----------
117
118kvmtool is maintained by Will Deacon <will@kernel.org> and Julien Thierry
119<julien.thierry.kdev@gmail.com>.
120