From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46380) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkmkm-000333-KQ for qemu-devel@nongnu.org; Fri, 16 Sep 2016 02:36:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bkmki-00008X-7o for qemu-devel@nongnu.org; Fri, 16 Sep 2016 02:36:04 -0400 Received: from mail.ispras.ru ([83.149.199.45]:57812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkmki-0008WM-0F for qemu-devel@nongnu.org; Fri, 16 Sep 2016 02:36:00 -0400 From: "Pavel Dovgalyuk" References: <20160915090042.6440.22516.stgit@PASHA-ISP> <20160915090122.6440.89499.stgit@PASHA-ISP> <3ae71766-e5f3-5d8f-cf36-ba278c4cff7d@redhat.com> In-Reply-To: <3ae71766-e5f3-5d8f-cf36-ba278c4cff7d@redhat.com> Date: Fri, 16 Sep 2016 09:35:40 +0300 Message-ID: <000c01d20fe4$8beed150$a3cc73f0$@ru> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Content-Language: ru 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: 'Paolo Bonzini' , 'Pavel Dovgalyuk' , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, quintela@redhat.com, jasowang@redhat.com, mst@redhat.com, agraf@suse.de, david@gibson.dropbear.id.au > 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. Pavel Dovgalyuk