qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] struct TimerState


From: Nilay Vaish
Subject: Re: [Qemu-devel] struct TimerState
Date: Tue, 21 Jun 2011 05:24:27 -0500 (CDT)

On Mon, 20 Jun 2011, Llu??s wrote:

Nilay  writes:

I am trying to understand the structures that QEMU saves when do_savevm()
is invoked. Can anyone explain to me the fields that are part of the
TimerState structure in qemu-timer.c?

If my meory does not fail me, its main task is to capture what is the
time in the host whenever the VM is started and stopped.

This is later used to adapt the VM time when using icount in adaptive
mode (-icount=auto). I remember seeing it used somewhere else, but right
now I cannot recall exactly what for.

This reminds me that I've been navigating through all the time-related
code in QEMU and, in order to make it more easy to follow, I've started
separating the routines in qemu-timer into different files (e.g.,
qemu-htime and qemu-vtime for routines accessing time sources in the
host and in the VM). I will send the patches as soon as I finish the
rewrite.


Let me ask a more pointed question. Is there a way to know how many cycles the virtual machine has been running for? A comment that appears before the defintion of the TimerState structure -- guest cycle counter. As per Lluis' reply, this structure is keeping track of the time when the VM started. Can you determine this from the variables that are part of this structure?

Thanks
Nilay

reply via email to

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