Proceedings of ISP RAS

Automation of device and machine development for QEMU

Efimov V.Yu. (ISP RAS, Moscow, Russia)
Bezzubikov A.A. (ISP RAS, Moscow, Russia)
Bogomolov D.A. (ISP RAS, Moscow, Russia)
Goremykin O.V. (ISP RAS, Moscow, Russia)
Padaryan V.A. (ISP RAS, Moscow, Russia; MSU, Moscow, Russia)


Both virtual device and machine development for QEMU are difficult. To simplify the work of a developer we had analyzed both QEMU architecture and the development workflow. In this paper we suggest the new development approach which uses a declarative description for both machine and devices. The approach is implemented as an integrated software tool that returns a set of files containing a C code which could be compiled. Resulting code of machine is ready to use except for CPU configuration and CLI input. In case of a device, a developer has to implement the behavior of the device. Both device draft generation settings and machine content description are given to the tool in Python. A machine visual representation by a GUI is also implemented. A developer could use either GUI or a text editor (or both) to specify the settings. This way, the first stage of the development is automated. The tool was evaluated on Q35-based PC and Cisco 2621XM. The amount of device generation settings lines is 11-26 times smaller than the amount of the result code lines. This difference is achieved by generation of device model auxiliary code part which has a significant size because of QEMU API, while it could be generated using relatively small amount of settings. Generated code part is ¼ - ¾ of final machine code. The source code of the tool is available at


software emulator; binary code; virtual machine development


Proceedings of the Institute for System Programming, vol. 29, issue 6, 2017, pp. 77-104.

ISSN 2220-6426 (Online), ISSN 2079-8156 (Print).

DOI: 10.15514/ISPRAS-2017-29(6)-4

Full text of the paper in pdf (in Russian) Back to the contents of the volume