Abstract:
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 1/4–3/4 of final machine code. The source code of the tool is available at https://github.com/ispras/qdt.
Citation:
V. Yu. Efimov, A. A. Bezzubikov, D. A. Bogomolov, O. V. Goremykin, V. A. Padaryan, “Automation of device and machine development for QEMU”, Proceedings of ISP RAS, 29:6 (2017), 77–104
\Bibitem{EfiBezBog17}
\by V.~Yu.~Efimov, A.~A.~Bezzubikov, D.~A.~Bogomolov, O.~V.~Goremykin, V.~A.~Padaryan
\paper Automation of device and machine development for QEMU
\jour Proceedings of ISP RAS
\yr 2017
\vol 29
\issue 6
\pages 77--104
\mathnet{http://mi.mathnet.ru/tisp274}
\crossref{https://doi.org/10.15514/ISPRAS-2017-29(6)-4}
\elib{https://elibrary.ru/item.asp?id=32309067}
Linking options:
https://www.mathnet.ru/eng/tisp274
https://www.mathnet.ru/eng/tisp/v29/i6/p77
This publication is cited in the following 4 articles:
D. S. Koltunov, V. Yu. Efimov, V. A. Padaryan, “Automated Testing of a TCG Frontend for Qemu”, Program Comput Soft, 46:8 (2020), 737
A. B. Bugerya, V. Yu. Efimov, I. I. Kulagin, V. A. Padaryan, M. A. Solovev, A. Yu. Tikhonov, “Programmnyi kompleks dlya vyyavleniya nedeklarirovannykh vozmozhnostei v usloviyakh otsutstviya iskhodnogo koda”, Trudy ISP RAN, 31:6 (2019), 33–64
D. S. Koltunov, V. Yu. Efimov, V. A. Padaryan, “Avtomatizirovannoe testirovanie frontenda translyatora TCG dlya Qemu”, Trudy ISP RAN, 31:5 (2019), 7–24