qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Need some help in understanding qemu infrastructure and


From: Ronex Dicapriyo
Subject: Re: [Qemu-devel] Need some help in understanding qemu infrastructure and execution flow
Date: Mon, 22 Dec 2014 17:05:46 +0000 (UTC)

 Thanks for the explanations, I have some more doubts on the same, Kindly clarify.


On Monday, 22 December 2014 10:10 PM, Peter Maydell <address@hidden> wrote:

> 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).

[Ronex] Ok, As I can understand, QEMU is functional accurate, rather than cycle for fast simulation. But there must be some kind of reference clock, like say for example any timer device which raises an interrupt after couple of cycles (i.e after each 50ns it increments it timer counter register), How it can be implemented in QEMU, I could not understand what you are referring by host clock, are you pointing at the real-time clock of the host system where any qemu binary or executable runs (it sounds quite wierd to me ) ?

> 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.)

Suppose I am directly accessing some X address of memory, which falls into the memory of device A, Now, if transaction doesn't involves CPU (may be using DMA), then how it calls the read/write methods associated with any device (for updating a device's register and carry out some specific functionality) ? Can you please suggest any memory management unit which is responsible for this ?

> 6) Debugging in QEMU

Debugging of QEMU, or of the guest?
How to debug any device code of QEMU, as well as some application running on 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.
I understand this, Thanks for all the suggestions, I was looking some for documentation to avoid any wrong interpretations.

> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]