Description of hardware configurations of guest systems in QEMU emulator as separate text files
https://doi.org/10.15514/ISPRAS-2014-26(2)-3
Abstract
QEMU is an open-source full system emulator based on the dynamic binary translation approach. QEMU emulates a complete hardware environment including CPUs, peripheral devices (VGA cards, network interfaces, IDE controllers, sound and USB components, and other). Guest system hardware configuration initialized at QEMU startup. During initialization phase QEMU creates virtual CPUs, peripheral devices and memory hierarchy. Hardware configuration is a part of QEMU source code. Being written in C language hardware configuration can be difficult to edit. Also, QEMU must be recompiled after any change in hardware configuration like addition of a new device. A method of the guest system hardware configuration description as an external file is discussed in this paper. JSON format was selected for configuration files. QEMU has parser for this format readily available because JSON is used by QEMU Monitor Protocol. Each file describes hardware configuration of one board. It consists of sequence of JSON objects. Each object describes properties one peripheral device, bus, CPU or memory segment. Each object has a unique ID associated with it and can reference other objects by their IDs. An arbitrary board configuration can be described with this format. The proposed method was implemented in QEMU and tested on ARM guest systems. The method is generic and can be applied to any board with any CPU architecture.
References
1. James Smith, Ravi Nair. Virtual Machines: Versatile Platforms for Systems and Processes. Morgan Kaufmann Publishers is an imprint by Elsevier, 500 Sansome Street, Suite 400, San Francisco, CA 94111, 2005.
2. Fabrice Bellard, QEMU, a fast and portable dynamic translator, In Proc. of the USENIX Annual Technical Conference, pages 41–46, April 2005.
3. QEMU – Open Source Processor Emulator. http://wiki.qemu.org. Date of visit: 19.03.2014.
4. Wind River Simics. http://www.windriver.com/simics. Date of visit: 19.03.2014.
5. The JSON Data Interchange Format, Standart ECMA-404, Geneva, 2013.
For citations:
Goremykin O.V.
Description of hardware configurations of guest systems in QEMU emulator as separate text files. Proceedings of the Institute for System Programming of the RAS (Proceedings of ISP RAS). 2014;26(2):87-96.
(In Russ.)
https://doi.org/10.15514/ISPRAS-2014-26(2)-3