From: Paolo Bonzini <pbonzini@redhat.com>
To: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
Cc: qemu-devel@nongnu.org, jasowang@redhat.com, agraf@suse.de,
david@gibson.dropbear.id.au
Subject: Re: [Qemu-devel] [PATCH 2/3] replay: allow replay stopping and restarting
Date: Wed, 8 Jun 2016 06:31:19 -0400 (EDT) [thread overview]
Message-ID: <257976361.20784345.1465381879882.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20160608051404.1688.65453.stgit@PASHA-ISP>
----- Original Message -----
> From: "Pavel Dovgalyuk" <pavel.dovgaluk@ispras.ru>
> To: qemu-devel@nongnu.org
> Cc: pbonzini@redhat.com, jasowang@redhat.com, agraf@suse.de, david@gibson.dropbear.id.au
> Sent: Wednesday, June 8, 2016 7:14:04 AM
> Subject: [PATCH 2/3] replay: allow replay stopping and restarting
>
> This patch fixes bug with stopping and restarting replay
> through monitor.
>
> Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
> ---
> block/blkreplay.c | 18 +++++++++++++-----
> cpus.c | 1 +
> include/sysemu/replay.h | 2 ++
> replay/replay-internal.h | 2 --
> vl.c | 1 +
> 5 files changed, 17 insertions(+), 7 deletions(-)
>
> diff --git a/block/blkreplay.c b/block/blkreplay.c
> index 42f1813..438170c 100644
> --- a/block/blkreplay.c
> +++ b/block/blkreplay.c
> @@ -70,6 +70,14 @@ static void blkreplay_bh_cb(void *opaque)
> g_free(req);
> }
>
> +static uint64_t blkreplay_next_id(void)
> +{
> + if (replay_events_enabled()) {
> + return request_id++;
> + }
> + return 0;
> +}
What happens if 0 is returned? I think that you want to call
replay_disable_events...
> bdrv_drain_all();
... after this bdrv_drain_all.
I was going to suggest using qemu_add_vm_change_state_handler
in replay_start (which could have replaced the existing call
to replay_enable_events), but that's not possible if you have
to do your calls after bdrv_drain_all.
Thanks,
Paolo
next prev parent reply other threads:[~2016-06-08 10:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-08 5:13 [Qemu-devel] [PATCH 0/3] icount/replay additions Pavel Dovgalyuk
2016-06-08 5:13 ` [Qemu-devel] [PATCH 1/3] target-ppc: exceptions handling in icount mode Pavel Dovgalyuk
2016-06-08 5:14 ` [Qemu-devel] [PATCH 2/3] replay: allow replay stopping and restarting Pavel Dovgalyuk
2016-06-08 10:31 ` Paolo Bonzini [this message]
2016-06-20 6:26 ` Pavel Dovgalyuk
2016-06-29 9:43 ` Pavel Dovgalyuk
2016-06-29 10:45 ` Paolo Bonzini
2016-06-29 11:40 ` Pavel Dovgalyuk
2016-06-08 5:14 ` [Qemu-devel] [PATCH 3/3] record/replay: add network support Pavel Dovgalyuk
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=257976361.20784345.1465381879882.JavaMail.zimbra@redhat.com \
--to=pbonzini@redhat.com \
--cc=agraf@suse.de \
--cc=david@gibson.dropbear.id.au \
--cc=jasowang@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).