qemu-devel
[Top][All Lists]
Advanced

[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;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]