On 22 December 2014 at 16:08, Ronex Dicapriyo <ronex...@yahoo.in> wrote: > I am interested in learning the qemu emulation technology, But I don't know > where to start. I have some knowledge/experience in device modeling. > > While walking through the qemu.org, I couldn't found proper documentation or > guide to start working with QEMU. > So, I am seeking some helps from the user's or developer's of QEMU. My aim > is to start step by step learning with : > > 1) the basic execution flow of QEMU simulation engine > 2) Notion of time, events in QEMU
We don't have quite the same kind of view of the world that a more strictly timed simulation would. Mostly QEMU aims for "execute correct code as fast as possible". We don't have any kind of cycle accuracy, for instance. Generally we just execute code, and events such as timer interrupts happen at the intervals that the host clock says they should (ie a 50Hz interrupt will tick every 1/50th of a second). > 3) Multithreading or multi-processing Currently we implement SMP guest configurations by simply doing a round-robin execution of each CPU on a single host thread. (There is work planned to change this so we can make use of multiple host threads.) > 4) ARM cortex-A series CPU implementation in QEMU The front-end lives in target-arm/. The usual layout for a front-end is that the decoder (reads guest-cpu instructions and writes QEMU TCG intermediate representation ops) is in translate*.c, and helper functions that get called at runtime (either directly from translated code or from the QEMU core) are in *helper*.c. > 5) Emulate or boot a linux on any ARM based platform There are a pile of tutorials out on the web for this. I'd use the "virt" board if I were you, it's relatively simple and supports virtio. > 6) Debugging in QEMU Debugging of QEMU, or of the guest? > Kindly direct me on proper path, and help me in learning QEMU. Kindly > suggest any links and books which can be used for comprehension. In general we don't have much documentation of QEMU's internals. The source code is always your best resource for figuring out exactly what we do. > While checking some hardware device source code, I found the use of > VMSTATE_UINTx kind of macros, Can anyone please suggest what is the purpose > of VMSTATE_xxx_xxx in QEMU ? They describe the state of the device so we can serialise it for live migration and VM snapshot save/restore. This one actually is documented -- see docs/migration.txt. thanks -- PMM