From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59532) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkowT-0007Pp-OR for qemu-devel@nongnu.org; Fri, 16 Sep 2016 04:56:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bkowP-0003s5-N9 for qemu-devel@nongnu.org; Fri, 16 Sep 2016 04:56:17 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33305) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkowP-0003ro-Gv for qemu-devel@nongnu.org; Fri, 16 Sep 2016 04:56:13 -0400 Received: by mail-wm0-f65.google.com with SMTP id b187so2618493wme.0 for ; Fri, 16 Sep 2016 01:56:13 -0700 (PDT) Sender: Paolo Bonzini References: <20160915090042.6440.22516.stgit@PASHA-ISP> <20160915090122.6440.89499.stgit@PASHA-ISP> <3ae71766-e5f3-5d8f-cf36-ba278c4cff7d@redhat.com> <000c01d20fe4$8beed150$a3cc73f0$@ru> From: Paolo Bonzini Message-ID: Date: Fri, 16 Sep 2016 10:55:09 +0200 MIME-Version: 1.0 In-Reply-To: <000c01d20fe4$8beed150$a3cc73f0$@ru> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 07/10] replay: allow replay stopping and restarting List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Dovgalyuk , 'Pavel Dovgalyuk' , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, mst@redhat.com, jasowang@redhat.com, quintela@redhat.com, agraf@suse.de, david@gibson.dropbear.id.au On 16/09/2016 08:35, Pavel Dovgalyuk wrote: >> From: Paolo Bonzini [mailto:paolo.bonzini@gmail.com] On Behalf Of Paolo Bonzini >> On 15/09/2016 11:01, Pavel Dovgalyuk wrote: >>> This patch fixes bug with stopping and restarting replay >>> through monitor. >>> >>> Signed-off-by: Pavel Dovgalyuk >>> --- >>> diff --git a/vl.c b/vl.c >>> index f2193cb..32155f5 100644 >>> --- a/vl.c >>> +++ b/vl.c >>> @@ -746,6 +746,7 @@ void vm_start(void) >>> if (runstate_is_running()) { >>> qapi_event_send_stop(&error_abort); >>> } else { >>> + replay_enable_events(); >> >> Can this be done with a change state notifier? > > We have to be sure that events are enabled before any of the callbacks will try to > use events subsystem. Therefore enabling events must be the first thing to do. Ok. Paolo