On 29/06/20 11:35, Claudio Fontana wrote:
> refactoring of cpus.c continues with cpu timer state extraction.
>
> cpu-timers: responsible for the cpu timers state, and for access to
> cpu clocks and ticks.
>
> icount: counts the TCG instructions executed. As such it is specific to
> the TCG accelerator. Therefore, it is built only under CONFIG_TCG.
>
> One complication is due to qtest, which misuses icount to warp time
> (qtest_clock_warp). In order to solve this problem, detach instead qtest
> from icount, and use a trivial separate counter for it.
>
> This requires fixing assumptions scattered in the code that
> qtest_enabled() implies icount_enabled().
>
> No functionality change.
>
> Signed-off-by: Claudio Fontana <[email protected]>
> Reviewed-by: Alex Bennée <[email protected]>
Claudio,
this weirdly enough causes iotest 267 (i.e. basically vmstate
save/restore) to break on s390:
+Unexpected storage key flag data: 0
+error while loading state for instance 0x0 of device 's390-skeys'
+Error: Error -22 while loading VM state
Bisectable, 100% failure rate, etc. :( Can you split the patch in
multiple parts, specifically separating any rename or introducing of
includes from the final file move?
Also, the patch breaks --disable-tcg, which is easily fixed by changing
the prototype for icount_enabled() to
#if defined CONFIG_TCG || !defined NEED_CPU_H
extern bool icount_enabled(void);
#else
#define icount_enabled() 0
#endif
(This way, more TCG-only code in cpus.c gets elided). You can integrate
this change in the next version.
Paolo