¶ Qemu notes
Homepage at qemu.org. Some parts outdated (Mar 2009).
Git tree at http://git.savannah.gnu.org/cgit/qemu.git.
QEMU on Wikipedia.
¶ Building
$ git clone http://git.savannah.gnu.org/cgit/qemu.git
$ cd qemu
$ ./configure --target-list=arm-softmmu,x86_64-softmmu,i386-softmmu,arm-softmmu,armeb-softmmu,arm-linux-user,armeb-linux-user,i386-linux-user,x86_64-linux-user
$ make -j -l3
¶ Tips
¶ Viewing generated code
You can check to generated host code and compare it to the guest code
via -d in_asm,out_asm (or via the monitor: log in_asm,out_asm), logs
will be written /tmp/qemu.log by default. The ratio of direct (chained)
jumps is given via "info jit".
¶ Versatile 256MB RAM limit
The Versatile ARM board has a limit of 256MB of RAM. Specifying more will
cause QEMU to segfault.
There are some patches
available that remove this limitation.
¶ Links
- dyngen
- the old code generator
- version >= 0.9.1
- tied to gcc 3.x
- USENIX paper
tcg
the new code generator
version >= 0.10
based on tcc, the tiny c compiler
README
tcg annoucement by Fabrice Bellard
"Are cycle accurate simulators a waste of time"
http://www.csl.cornell.edu/~vince/papers/wddd08/index.html
QEMU Internals
qemu-tech outdated (checked Mar 2009)
use `texi2html qemu-doc.texi` in root of source dir to generate
qemu-doc, generated Mar 2009
3D accelration
Doug Schaefer, a Wind River employee blogs about his work with QEMU
Mentions doing 3D accelleration, with the goal being able to emulate OpenGL ES
http://cdtdoug.blogspot.com/2009/03/way-too-much-fun-with-qemu.html
How does the Android emulator do it's 3D emulation?
Python interface
A patch series was posted by Ryan Harper, an IBM employee, that provided a python interface for scripting qemu, as well as a test framework. It appears it was not merged.
http://lists.gnu.org/archive/html/qemu-devel/2008-10/msg00664.html
http://www.nongnu.org/qemu/links.html
CPU-EMULATION.TXT, from the Android Open Source Project
Branches are expensive
Looking at generated code size for branches for ARM on x86
http://lists.gnu.org/archive/html/qemu-devel/2009-03/msg00840.html
Separate thread for IO
Allow the device model to run while the VCPU executes
For KVM only, as tcg is not thread safe
http://lists.gnu.org/archive/html/qemu-devel/2009-03/msg00586.html
Thread starts at http://lists.gnu.org/archive/html/qemu-devel/2009-03/msg00578.html
(im)Precise guest instruction count
http://lists.gnu.org/archive/html/qemu-devel/2009-03/msg00507.html
Thread starts at http://lists.gnu.org/archive/html/qemu-devel/2009-03/msg00481.html