[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/3] replay: allow replay stopping and restartin
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 2/3] replay: allow replay stopping and restarting |
Date: |
Wed, 8 Jun 2016 06:31:19 -0400 (EDT) |
----- Original Message -----
> From: "Pavel Dovgalyuk" <address@hidden>
> To: address@hidden
> Cc: address@hidden, address@hidden, address@hidden, address@hidden
> 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 <address@hidden>
> ---
> 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
[Qemu-devel] [PATCH 1/3] target-ppc: exceptions handling in icount mode, Pavel Dovgalyuk, 2016/06/08
[Qemu-devel] [PATCH 3/3] record/replay: add network support, Pavel Dovgalyuk, 2016/06/08