QEMU - Tiny Code Generator, Accelarator and Hardware assisted emulation
The article will provide a user with information on QEMU’s Tiny code generator, Accelerator and Hardware assisted emulation.
Tiny Code Generator (TCG)
The Tiny Code Generator (TCG) aims to remove the shortcoming of relying on a particular version of GCC or any compiler, instead incorporating the compiler (code generator) into other tasks performed by QEMU in run-time.
Accelerator
Virtualization of machines or operating systems comes at the cost of speed of execution. One tried and true method to reduce the effect (cost) are software-based drivers which perform specific functions that would otherwise be very costly to perform by the virtualization software.
KQEMU or QEMU Accelerator was a Linux kernel module which notably sped up x86 emulation on x86 platforms. This was accomplished by running user mode code directly on the host computer’s CPU, and using processor and peripheral emulation only for kernel mode and real mode code. KQEMU also supported a kernel emulation mode in which portions of kernel mode code run on the host’s CPU.
Unlike KVM, KQEMU could execute code from many guest OSes even if the host CPU does not support hardware virtualization. KQEMU supports both x86 and x86_64 CPUs.
QVM86 was a drop-in replacement for the then closed-source KQEMU, licensed under GNU GPLv2 license. The developer of QVM86 ceased development on January 21, 2007 as they decided that the project had been rendered obsolete by the release of VirtualBox.
Hardware-assisted emulation
The MIPS-compatible Loongson-3 processor adds 200 new instructions to help QEMU translate x86 instructions; those new instructions lower the overhead of executing x86/CISC-style instructions in the MIPS pipeline.
Parallel emulation
Virtualization solutions that use QEMU are able to execute multiple virtual CPUs in parallel. QEMU is also able to run multiple threads in user-mode emulation mode.
For full system emulation, QEMU uses a single thread to emulate all the virtual CPUs and hardware. COREMU is a patch to QEMU to break this limitation. Each core uses a separate instance of QEMU binary translation engine, with a thin library layer to handle the inter-core and device communication and synchronization.
If a user has read this article then he/she would have learnt about QEMU’s Tiny code generator, Accelerator and Hardware assisted emulation.













