1 \input texinfo @c -*- texinfo -*-
4 @settitle QEMU Accelerator User Documentation
7 @center @titlefont{QEMU Accelerator User Documentation}
14 QEMU Accelerator (KQEMU) is a driver allowing the QEMU PC emulator to
15 run much faster when emulating a PC on an x86 host.
17 KQEMU is currently only supported for an x86 Linux 2.4 or 2.6 host
18 system, but more host OSes (Windows, *BSD) and processors (x86_64)
19 will be supported in the future.
24 KQEMU is currently only supported on Linux/x86.
26 @section QEMU Compilation
28 First you must decompress the QEMU sources:
31 tar zxvf qemu-x.y.z.tar.gz
35 Download and install the QEMU Accelerator Module in
38 tar zxvf /tmp/kqemu-x.y.z.tar.gz
41 Then you configure QEMU and build it (usually no options are needed):
47 Then type as root user:
51 to install QEMU in @file{/usr/local}.
53 @section QEMU Accelerator Installation
55 If you use x86 Linux, the compilation of the QEMU Accelerator Kernel
56 Module (KQEMU) is automatically activated provided you have the
57 necessary kernel headers. If nonetheless the compilation fails, you
58 can disable its compilation with the @option{--disable-kqemu}
61 If you are using a 2.6 host kernel, then all the necessary kernel
62 headers should be already installed. If you are using a 2.4 kernel,
63 then you should verify that properly configured kernel sources are
64 installed and compiled. On a Redhat 9 distribution for example, the
65 following must be done:
67 1) Install the kernel-source-xxx package
68 2) cd /usr/src/linux-xxx
70 4) Copy /boot/config-vvv in .config (use uname -r to know your configuration name 'vvv')
71 5) Edit the Makefile to change the EXTRAVERSION line to match your
72 current configuration name:
73 EXTRAVERSION = -custom
75 EXTRAVERSION = -8 # This is an example, it can be -8smp too
76 5) make menuconfig # Just save the configuration
80 The installation of KQEMU is not fully automatic because it is highly
81 distribution dependent. When launching
86 KQEMU is installed in /lib/modules/@var{kernel_version}/misc. The
87 device @file{/dev/kqemu} is created with read/write access rights for
88 everyone. If you fear security issues, you can restrict the access
89 rights of @file{/dev/kqemu}.
91 If you want that KQEMU is installed automatically at boot time, you can add
94 # Load the KQEMU kernel module
98 in @file{/etc/rc.d/rc.local}.
100 If your distribution uses udev (like Fedora), the @file{/dev/kqemu} is
101 not created automatically (yet) at every reboot. You can add the
102 following in @file{/etc/rc.d/rc.local}:
105 # Create the KQEMU device
106 mknod /dev/kqemu c 250 0
112 When QEMU is compiled with KQEMU support, the following option is
117 Disable the usage of the QEMU Accelerator module (KQEMU). QEMU will work as
118 usual but will be slower. This option can be useful to determine if
119 emulation problems are coming from KQEMU.
122 When using KQEMU, QEMU will create a big hidden file containing the
123 RAM of the virtual machine. For best performance, it is important that
124 this file is kept in RAM and not on the hard disk. QEMU uses the
125 @file{/dev/shm} directory to create this file because @code{tmpfs} is
126 usually mounted on it (check with the shell command
127 @code{df}). Otherwise @file{/tmp} is used as fallback. You can use the
128 @var{QEMU_TMPDIR} shell variable to set a new directory for the QEMU
131 KQEMU has only been tested with Linux 2.4, Linux 2.6 and Windows 2000
132 as guest OSes. If your guest OS do not work with KQEMU, you can
133 dynamically disable KQEMU with the @option{-no-kqemu} option.