[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC v3 2/8] cpus: prepare new CpusAccel cpu accelerator interface
From: |
Paolo Bonzini |
Subject: |
Re: [RFC v3 2/8] cpus: prepare new CpusAccel cpu accelerator interface |
Date: |
Sun, 30 Aug 2020 18:41:40 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 |
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
[RFC v3 3/8] cpus: extract out TCG-specific code to accel/tcg, Claudio Fontana, 2020/08/03
[RFC v3 4/8] cpus: extract out qtest-specific code to accel/qtest, Claudio Fontana, 2020/08/03
[RFC v3 1/8] cpu-timers, icount: new modules, Claudio Fontana, 2020/08/03
[RFC v3 5/8] cpus: extract out kvm-specific code to accel/kvm, Claudio Fontana, 2020/08/03
[RFC v3 8/8] cpus: extract out hvf-specific code to target/i386/hvf/, Claudio Fontana, 2020/08/03