[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: |
Fri, 31 Jul 2020 12:59:33 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 |
On 7/31/20 12:09 AM, Paolo Bonzini wrote:
> On 30/07/20 18:33, Claudio Fontana wrote:
>> 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,
>
> Not all of it, only the VIRTUAL clock which is
>
> if (use_icount) {
> return cpu_get_icount();
> } else {
> return cpu_get_clock();
> }
>
> and would be changed to something like
>
> return cpu_get_virtual_clock();
>
> In turn cpu_get_virtual_clock() is
>
> return (accel_ops->cpu_get_virtual clock ?: cpu_get_clock)();
>
> in the emulators, plus a stub that replaces stubs/cpu-get-icount.c and
> is just
>
> return get_clock_realtime();
>
> as in stubs/cpu-get-clock.c.
>
> Paolo
>
>
works, hooking up cpu_get_ticks() also works.
qemu_start_warp_timer seems to make sense only for tcg/icount and not for
qtest, which directly sets and warps the clock, is that right?
Would you want a start_warp_timer cpu accel interface that is actually useful
only for tcg, to avoid if (icount_enabled()) { qemu_start_warp_timer()? }
Thanks,
Claudio
- Re: [PATCH 3/3] cpu-timers, icount: new modules, (continued)
- 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, 2020/07/30
- 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 <=