[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/3] cpu-timers, icount: new modules
From: |
Claudio Fontana |
Subject: |
Re: [PATCH 3/3] cpu-timers, icount: new modules |
Date: |
Thu, 30 Jul 2020 18:33:40 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 |
On 7/29/20 12:01 PM, Paolo Bonzini wrote:
> 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
>
One problem I noticed is that qemu_clock_get_ns is util/qemu-timer.c, which is
tools _and_ softmmu,
while I tried to extract the softmmu-only timer code in softmmu/cpu-timers.c,
and the way I saw it, accelerator cpu interface was softmmu only..
Will pause and keep thinking about this.
Thanks,
Claudio
- Re: [PATCH 3/3] cpu-timers, icount: new modules, (continued)
- Re: [PATCH 3/3] cpu-timers, icount: new modules, Claudio Fontana, 2020/07/13
- Re: [PATCH 3/3] cpu-timers, icount: new modules, Thomas Huth, 2020/07/10
- Re: [PATCH 3/3] cpu-timers, icount: new modules, Paolo Bonzini, 2020/07/10
- Re: [PATCH 3/3] cpu-timers, icount: new modules, Claudio Fontana, 2020/07/11
- Re: [PATCH 3/3] cpu-timers, icount: new modules, Paolo Bonzini, 2020/07/11
- Re: [PATCH 3/3] cpu-timers, icount: new modules, Claudio Fontana, 2020/07/11
- Re: [PATCH 3/3] cpu-timers, icount: new modules, Paolo Bonzini, 2020/07/11
- Re: [PATCH 3/3] cpu-timers, icount: new modules, Claudio Fontana, 2020/07/11
- Re: [PATCH 3/3] cpu-timers, icount: new modules, Claudio Fontana, 2020/07/29
- Re: [PATCH 3/3] cpu-timers, icount: new modules, Paolo Bonzini, 2020/07/29
- Re: [PATCH 3/3] cpu-timers, icount: new modules,
Claudio Fontana <=
- Re: [PATCH 3/3] cpu-timers, icount: new modules, Paolo Bonzini, 2020/07/30
- Re: [PATCH 3/3] cpu-timers, icount: new modules, Claudio Fontana, 2020/07/31