diff options
author | Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> | 2018-07-25 15:15:26 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2018-07-30 14:00:11 +0200 |
commit | e4dab9449a41d1bc61e4866c6fe2582513ddbff4 (patch) | |
tree | 7278244d4ce3c915cac34c80e3f95f27dc1338c3 | |
parent | 1d3db6bdbb0b541744cc9e008371ec7a37986d8a (diff) |
timer: remove replay clock probe in deadline calculation
Ciro Santilli reported that commit a5ed352596a8b7eb2f9acce34371b944ac3056c4
breaks the execution replay. It happens due to the probing the clock
for the new instances of iothread.
However, this probing was made in replay mode for the timer lists that
are empty.
This patch removes clock probing in replay mode.
It is an artifact of the old version with another thread model.
Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
Message-Id: <20180725121526.12867.17866.stgit@pasha-VirtualBox>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | util/qemu-timer.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/util/qemu-timer.c b/util/qemu-timer.c index 2ed1bf2778..86bfe84037 100644 --- a/util/qemu-timer.c +++ b/util/qemu-timer.c @@ -578,17 +578,10 @@ int64_t timerlistgroup_deadline_ns(QEMUTimerListGroup *tlg) { int64_t deadline = -1; QEMUClockType type; - bool play = replay_mode == REPLAY_MODE_PLAY; for (type = 0; type < QEMU_CLOCK_MAX; type++) { if (qemu_clock_use_for_deadline(type)) { - if (!play || type == QEMU_CLOCK_REALTIME) { - deadline = qemu_soonest_timeout(deadline, - timerlist_deadline_ns(tlg->tl[type])); - } else { - /* Read clock from the replay file and - do not calculate the deadline, based on virtual clock. */ - qemu_clock_get_ns(type); - } + deadline = qemu_soonest_timeout(deadline, + timerlist_deadline_ns(tlg->tl[type])); } } return deadline; |