[Top][All Lists]

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

Re: QEMU Clock record and replay

From: Pavel Dovgalyuk
Subject: Re: QEMU Clock record and replay
Date: Fri, 26 Feb 2021 09:24:35 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 25.02.2021 18:43, Philippe Mathieu-Daudé wrote:
Cc'ing Pavel/Alex.

On 2/25/21 4:09 PM, Arnabjyoti Kalita wrote:
Hello all,

I am trying to understand how the clock values are recorded and replayed
in QEMU (when it runs in TCG mode). I have been specifically following
the document that has been provided here -

I have the following 4 questions to ask-

- Why are clock values being replayed off a cache and not directly off
the file as seen here -

The cache was needed when replay does not follow the record behavior.
E.g., included additional deadline calculations or timer checks.
I'm not sure, that it is still needed, and I'll check it during future
refactoring session.

- I have a requirement to record and replay host clock values. Can it so
happen that if incorrect values of the host clock are replayed, then the
timers in the guest start expiring incorrectly, during replay?

This is a bug, when the host clock is replayed incorrectly.

- Let's say we record the clock values when the guest starts in KVM
mode, and we replay the clock values when the guest starts in TCG mode.
Does the record-replay functionality change a lot?

Only if you want to replay just the clock.
But replaying whole execution includes instruction counting and thread synchronization.

- Also, I couldn't understand the specific purpose of replaying the
'virtual real time clock' ? Do I still need to record and replay the
'virtual real time clock' if we record the clock values in KVM mode, and
replay the clock values in TCG mode?

This clock is used for icount-related timers. For now icount is required
for record replay. If you want to replay only host clock, you don't need this one.

Pavel Dovgalyuk

reply via email to

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