0.8.0-alt1
[qemu] / kqemu / kqemu-doc.html
1 <HTML>
2 <HEAD>
3 <!-- Created by texi2html 1.56k from kqemu-doc.texi on 4 September 2005 -->
4
5 <TITLE>QEMU Accelerator User Documentation</TITLE>
6 </HEAD>
7 <BODY>
8 <H1>QEMU Accelerator User Documentation</H1>
9 <P>
10 <P><HR><P>
11 <H1>Table of Contents</H1>
12 <UL>
13 <LI><A NAME="TOC1" HREF="kqemu-doc.html#SEC1">1. Introduction</A>
14 <LI><A NAME="TOC2" HREF="kqemu-doc.html#SEC2">2. Installation</A>
15 <UL>
16 <LI><A NAME="TOC3" HREF="kqemu-doc.html#SEC3">2.1 QEMU Compilation</A>
17 <LI><A NAME="TOC4" HREF="kqemu-doc.html#SEC4">2.2 QEMU Accelerator Installation for Linux</A>
18 <LI><A NAME="TOC5" HREF="kqemu-doc.html#SEC5">2.3 QEMU Accelerator Installation for Windows</A>
19 </UL>
20 <LI><A NAME="TOC6" HREF="kqemu-doc.html#SEC6">3. Usage</A>
21 </UL>
22 <P><HR><P>
23
24 <P>
25 QEMU Accelerator User Documentation
26
27
28
29
30 <H1><A NAME="SEC1" HREF="kqemu-doc.html#TOC1">1. Introduction</A></H1>
31
32 <P>
33 QEMU Accelerator (KQEMU) is a driver allowing the QEMU PC emulator to
34 run much faster when emulating a PC on an x86 host. 
35
36
37 <P>
38 KQEMU is supported on x86 or x86_64 Linux 2.4 or 2.6
39 hosts. Experimental versions are available for FreeBSD and Windows
40 NT/2000/2003/XP.
41
42
43
44
45 <H1><A NAME="SEC2" HREF="kqemu-doc.html#TOC2">2. Installation</A></H1>
46
47
48
49 <H2><A NAME="SEC3" HREF="kqemu-doc.html#TOC3">2.1 QEMU Compilation</A></H2>
50
51 <P>
52 First you must decompress the QEMU sources:
53
54 <PRE>
55 cd /tmp
56 tar zxvf qemu-x.y.z.tar.gz
57 cd qemu-x.y.z
58 </PRE>
59
60 <P>
61 Download and install the QEMU Accelerator Module in
62 qemu-x.y.z/:
63
64 <PRE>
65 tar zxvf /tmp/kqemu-x.y.z.tar.gz
66 </PRE>
67
68 <P>
69 Then you configure QEMU and build it (usually no options are needed):
70
71 <PRE>
72 ./configure
73 make
74 </PRE>
75
76 <P>
77 Then type as root user:
78
79 <PRE>
80 make install
81 </PRE>
82
83 <P>
84 to install QEMU in <TT>`/usr/local'</TT>.
85
86
87
88
89 <H2><A NAME="SEC4" HREF="kqemu-doc.html#TOC4">2.2 QEMU Accelerator Installation for Linux</A></H2>
90
91 <P>
92 If you use x86 Linux, the compilation of the QEMU Accelerator Kernel
93 Module (KQEMU) is automatically activated provided you have the
94 necessary kernel headers. If nonetheless the compilation fails, you
95 can disable its compilation with the <SAMP>`--disable-kqemu'</SAMP>
96 configure option. 
97
98
99 <P>
100 Note that KQEMU cannot currently work if the Xen virtualizer is
101 running on your host.
102
103
104 <P>
105 If you are using a 2.6 host kernel, then all the necessary kernel
106 headers should be already installed. If you are using a 2.4 kernel,
107 then you should verify that properly configured kernel sources are
108 installed and compiled. On a Redhat 9 distribution for example, the
109 following must be done:
110
111 <PRE>
112 1) Install the kernel-source-xxx package
113 2) cd /usr/src/linux-xxx
114 3) make distclean
115 4) Copy /boot/config-vvv in .config (use uname -r to know your configuration name 'vvv')
116 5) Edit the Makefile to change the EXTRAVERSION line to match your
117    current configuration name:
118    EXTRAVERSION = -custom
119 to 
120    EXTRAVERSION = -8 # This is an example, it can be -8smp too
121 5) make menuconfig # Just save the configuration
122 6) make dep bzImage
123 </PRE>
124
125 <P>
126 The installation of KQEMU is not fully automatic because it is highly
127 distribution dependent. When launching 
128
129 <PRE>
130 make install
131 </PRE>
132
133 <P>
134 KQEMU is installed in /lib/modules/<VAR>kernel_version</VAR>/misc. The
135 device <TT>`/dev/kqemu'</TT> is created with read/write access rights for
136 everyone. If you fear security issues, you can restrict the access
137 rights of <TT>`/dev/kqemu'</TT>.
138
139
140 <P>
141 If you want that KQEMU is installed automatically at boot time, you can add
142
143
144
145 <PRE>
146 # Load the KQEMU kernel module
147 /sbin/modprobe kqemu
148 </PRE>
149
150 <P>
151 in <TT>`/etc/rc.d/rc.local'</TT>.
152
153
154 <P>
155 If the major number 250 is already used by another driver, you can use
156 the option <CODE>major=N</CODE> to set an alternate major number.
157
158
159 <P>
160 If your distribution uses udev (like Fedora), use the kqemu module
161 option <CODE>major=0</CODE> to have the device <TT>`/dev/kqemu'</TT> automatically
162 created:
163
164
165
166 <PRE>
167 # Load the KQEMU kernel module
168 /sbin/modprobe kqemu major=0
169 </PRE>
170
171 <P>
172 It is usually necessary to change the device access rights set by
173 udev. Edit <TT>`/etc/udev/permissions.d/50-udev.permissions'</TT> and add:
174
175 <PRE>
176 # kqemu
177 kqemu:root:root:0666
178 </PRE>
179
180
181
182 <H2><A NAME="SEC5" HREF="kqemu-doc.html#TOC5">2.3 QEMU Accelerator Installation for Windows</A></H2>
183
184 <P>
185 Right click on <TT>`kqemu.inf'</TT> in Explorer and choose Install.
186
187
188 <P>
189 In order to start kqemu, you must do:
190
191 <PRE>
192 net start kqemu
193 </PRE>
194
195
196
197 <H1><A NAME="SEC6" HREF="kqemu-doc.html#TOC6">3. Usage</A></H1>
198
199 <P>
200 When QEMU is compiled with KQEMU support, the following option is
201 added to QEMU:
202
203
204 <DL COMPACT>
205
206 <DT><SAMP>`-no-kqemu'</SAMP>
207 <DD>
208 Disable the usage of the QEMU Accelerator module (KQEMU). QEMU will work as
209 usual but will be slower. This option can be useful to determine if
210 emulation problems are coming from KQEMU.
211 </DL>
212
213 <P>
214 When using KQEMU on a Linux or FreeBSD host, QEMU will create a big
215 hidden file containing the RAM of the virtual machine. For best
216 performance, it is important that this file is kept in RAM and not on
217 the hard disk. QEMU uses the <TT>`/dev/shm'</TT> directory to create this
218 file because <CODE>tmpfs</CODE> is usually mounted on it (check with the
219 shell command <CODE>df</CODE>). Otherwise <TT>`/tmp'</TT> is used as
220 fallback. You can use the <VAR>QEMU_TMPDIR</VAR> shell variable to set a
221 new directory for the QEMU RAM file.
222
223
224 <P>
225 KQEMU has only been tested with Linux 2.4, Linux 2.6 and Windows 2000
226 as guest OSes. If your guest OS do not work with KQEMU, you can
227 dynamically disable KQEMU with the <SAMP>`-no-kqemu'</SAMP> option.
228
229
230 <P>
231 If you use kqemu on an x86_64 host, you must use
232 <TT>`qemu-system-x86_64'</TT> instead of <TT>`qemu'</TT>.
233
234
235 <P>
236 To see if kqemu is enabled and working correctly, use the QEMU monitor
237 command:
238
239 <PRE>
240 info kqemu
241 </PRE>
242
243 <P><HR><P>
244 This document was generated on 4 September 2005 using
245 <A HREF="http://wwwinfo.cern.ch/dis/texi2html/">texi2html</A>&nbsp;1.56k.
246 </BODY>
247 </HTML>