On 29/07/20 10:48, Claudio Fontana wrote:
>> If you want you can add to your accelerator ops series one for
>> qemu_get_clock_ns(QEMU_CLOCK_VIRTUAL), cpu_get_ticks() and
>> qemu_start_warp_timer(), that would certainly work for me;
> 
> The problem I see here is, as usual, one of meaning.
> 
> Are qemu_get_clock_ns, cpu_get_ticks and qemu_start_warp_timer
> accelerator-specific cpu interfaces?

qemu_get_clock_ns(QEMU_CLOCK_VIRTUAL) is because it needs to take icount
into account, likewise for cpu_get_ticks(); icount is TCG and qtest
specific (with subtle differences between TCG makes icount optional and
qtest makes it mandatory, so further separation of the two concepts is
totally fine for me).

qemu_start_warp_timer() also is accelerator-specific because, besides
icount not being applicable to virtualizing accelerators, the warp timer
is not needed for qtest, only for TCG.

> Looking at their implementation, currently I don't think they are, what do 
> you think?
> 
> Should these be grouped together with
> 
> create_vcpu_thread,
> kick_vcpu_thread,
> synchronize_cpu_state
> 
> in the same interface?

I think so.

Paolo


Reply via email to