The host clock refers to one of the clock types used by QEMU - ``` @QEMU_CLOCK_HOST: host clock * * The host clock should be used for device models that emulate accurate * real time sources. It will continue to run when the virtual machine * is suspended, and it will reflect system time changes the host may * undergo (e.g. due to NTP). ```
Thanks. Best Regards, Arnab On Fri, Feb 26, 2021 at 3:25 PM Alex Bennée <alex.ben...@linaro.org> wrote: > > Pavel Dovgalyuk <pavel.dovgal...@ispras.ru> writes: > > > 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 - > >>> https://github.com/qemu/qemu/blob/master/docs/replay.txt > >>> <https://github.com/qemu/qemu/blob/master/docs/replay.txt> > >>> > >>> 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 - > >>> https://github.com/qemu/qemu/blob/stable-5.0/replay/replay-time.c#L45? > >>> <https://github.com/qemu/qemu/blob/stable-5.0/replay/replay-time.c#L45 > ?>? > > > > 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. > > When you say host clock what do you mean? Surely all the cycle counters > are VIRTUAL? Or do you mean things like the RTC? > > -- > Alex Bennée >