Depending on host cpu speed, and QEMU optimization level, it may sometimes be needed to slow or accelerate time guest is perceiving. A common scenario is hitting a timeout during a boot process, because some operations were not finished on time.
An existing solution for that is -icount shift=X, with low values, which will roughly map virtual time to how many instructions were executed. This series introduces another approach, based on faking host time returned to the guest, by applying a time-dilation factor. Time will go slower/faster for the guest, without impacting QEMU emulation speed. It may eventually be used to fix some of the timeouts we hit in CI, by slowing down time in VM, to be less sensitive to varying cpu performance. Pierrick Bouvier (2): qemu/timer: introduce time dilation factor system/rtc: introduce -rtc time-dilation option include/qemu/timer.h | 22 ++++++++++++++++------ system/rtc.c | 11 +++++++++++ system/vl.c | 3 +++ util/qemu-timer-common.c | 1 + qemu-options.hx | 7 ++++++- 5 files changed, 37 insertions(+), 7 deletions(-) -- 2.47.2