[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFH PATCH 0/4] record/replay fixups and doubts
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [RFH PATCH 0/4] record/replay fixups and doubts |
Date: |
Tue, 13 Oct 2015 18:39:08 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
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;
- [Qemu-devel] [PATCH 1/4] replay: generalize ptimer event to bottom halves, (continued)
- [Qemu-devel] [PATCH 1/4] replay: generalize ptimer event to bottom halves, Paolo Bonzini, 2015/10/08
- [Qemu-devel] [PATCH 3/4] why is runstate_is_running needed?, Paolo Bonzini, 2015/10/08
- [Qemu-devel] [PATCH 2/4] more replay fixes, Paolo Bonzini, 2015/10/08
- Re: [Qemu-devel] [RFH PATCH 0/4] record/replay fixups and doubts, Pavel Dovgaluk, 2015/10/13
- Re: [Qemu-devel] [RFH PATCH 0/4] record/replay fixups and doubts,
Paolo Bonzini <=
- Re: [Qemu-devel] [RFH PATCH 0/4] record/replay fixups and doubts, Pavel Dovgaluk, 2015/10/23