On 13/10/2015 10:10, Pavel Dovgaluk wrote: > Sometimes replay cannot continue after stopping/restarting of the virtual > machine. > This happens because warp on stopped machine and on running machine behaves > differently. > Timers deadline calculation depends on enabled flag of the virtual timer. > The following patch fixes the problem - it disables warp when machine is > stopped. > > index 5130806..7a337d9 100644 > --- a/cpus.c > +++ b/cpus.c > @@ -411,7 +411,7 @@ void qemu_clock_warp(QEMUClockType type) > } > > /* warp clock deterministically in record/replay mode */ > - if (!replay_checkpoint(CHECKPOINT_CLOCK_WARP)) { > + if (!runstate_is_running() || !replay_checkpoint(CHECKPOINT_CLOCK_WARP)) > { > return; > }
Thanks, I'm adding a comment too: @@ -410,6 +410,13 @@ void qemu_clock_warp(QEMUClockType type) return; } + /* Nothing to do if the VM is stopped: QEMU_CLOCK_VIRTUAL timers + * do not fire, so computing the deadline does not make sense. + */ + if (!runstate_is_running()) { + return; + } + /* warp clock deterministically in record/replay mode */ if (!replay_checkpoint(CHECKPOINT_CLOCK_WARP)) { return;