On 30/08/20 15:34, Claudio Fontana wrote:
> Ciao Paolo,
> 
> just a ping on this one, it would seem that qemu_clock_get_ns needs to be 
> called before
> any accelerator is initialized, before ticks are enabled, as part of qcow2 
> initialization.
> 
> I could add a check specifically for this and a comment in the 
> cpus_get_virtual_clock(), but do you have any thoughts?

I think you could always return 0 before the accelerator is initialized;
the CPUs haven't started yet so the return value must be 0.

However, I wonder if that is already causing problems with live
migration (where the QEMU_CLOCK_VIRTUAL jumps from 0 to a possibly high
value after migration is completed).  So independent of this series,
perhaps QEMU_CLOCK_REALTIME should be used instead.  CCing Berto.

Paolo


Reply via email to