From: Paolo Bonzini <pbonzini@redhat.com>
To: Pavel Dovgaluk <Pavel.Dovgaluk@ispras.ru>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFH PATCH 0/4] record/replay fixups and doubts
Date: Tue, 13 Oct 2015 18:39:08 +0200 [thread overview]
Message-ID: <561D33AC.3070007@redhat.com> (raw)
In-Reply-To: <001601d1058e$98742b20$c95c8160$@Dovgaluk@ispras.ru>
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;
next prev parent reply other threads:[~2015-10-13 16:39 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-06 20:00 [Qemu-devel] [RFH PATCH 0/4] record/replay fixups and doubts Paolo Bonzini
2015-10-06 20:00 ` [Qemu-devel] [PATCH 1/4] replay: generalize ptimer event to bottom halves Paolo Bonzini
2015-10-07 7:53 ` Pavel Dovgaluk
2015-10-06 20:00 ` [Qemu-devel] [PATCH 2/4] more replay fixes Paolo Bonzini
2015-10-06 20:13 ` Eric Blake
2015-10-07 8:11 ` Pavel Dovgaluk
2015-10-06 20:00 ` [Qemu-devel] [PATCH 3/4] why is runstate_is_running needed? Paolo Bonzini
2015-10-07 8:14 ` Pavel Dovgaluk
[not found] ` <22126.3941414238$1444205724@news.gmane.org>
2015-10-07 8:46 ` Paolo Bonzini
2015-10-07 9:37 ` Pavel Dovgaluk
2015-10-06 20:00 ` [Qemu-devel] [PATCH 4/4] events doubts Paolo Bonzini
2015-10-07 8:21 ` Pavel Dovgaluk
[not found] ` <35633.6639299572$1444206177@news.gmane.org>
2015-10-07 8:52 ` Paolo Bonzini
2015-10-07 9:50 ` Pavel Dovgaluk
2015-10-07 10:23 ` Paolo Bonzini
2015-10-07 10:42 ` Pavel Dovgaluk
2015-10-07 10:48 ` Paolo Bonzini
2015-10-07 10:51 ` Pavel Dovgaluk
2015-10-07 14:59 ` Paolo Bonzini
2015-10-13 8:10 ` [Qemu-devel] [RFH PATCH 0/4] record/replay fixups and doubts Pavel Dovgaluk
2015-10-13 16:39 ` Paolo Bonzini [this message]
2015-10-23 7:28 ` Pavel Dovgaluk
2015-10-23 8:12 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=561D33AC.3070007@redhat.com \
--to=pbonzini@redhat.com \
--cc=Pavel.Dovgaluk@ispras.ru \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).