[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/3] cpu-timers, icount: new modules
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH 3/3] cpu-timers, icount: new modules |
Date: |
Fri, 31 Jul 2020 00:09:01 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 |
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
- Re: [PATCH 3/3] cpu-timers, icount: new modules, (continued)
- 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, 2020/07/30
- Re: [PATCH 3/3] cpu-timers, icount: new modules,
Paolo Bonzini <=
- Re: [PATCH 3/3] cpu-timers, icount: new modules, Claudio Fontana, 2020/07/31