From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57135) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHBHo-0000Eh-EU for qemu-devel@nongnu.org; Fri, 30 Jan 2015 08:07:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YHBHl-0000qk-8y for qemu-devel@nongnu.org; Fri, 30 Jan 2015 08:07:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49629) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHBHl-0000qR-1T for qemu-devel@nongnu.org; Fri, 30 Jan 2015 08:06:57 -0500 Message-ID: <54CB81E0.3040409@redhat.com> Date: Fri, 30 Jan 2015 14:06:40 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <20150122085127.5276.53895.stgit@PASHA-ISP.def.inno> <20150122085153.5276.96905.stgit@PASHA-ISP.def.inno> <54C9F95B.5020806@redhat.com> <003001d03c8c$1a8eab70$4fac0250$@Dovgaluk@ispras.ru> In-Reply-To: <003001d03c8c$1a8eab70$4fac0250$@Dovgaluk@ispras.ru> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH v8 04/21] replay: internal functions for replay log List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Dovgaluk , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, peter.crosthwaite@xilinx.com, alex.bennee@linaro.org, mark.burton@greensocs.com, real@ispras.ru, batuzovk@ispras.ru, maria.klimushenkova@ispras.ru, afaerber@suse.de, fred.konrad@greensocs.com On 30/01/2015 13:56, Pavel Dovgaluk wrote: > > Could this be static? (I haven't checked). > > No, because it is used from several replay files. I wonder if that's a layering violation. > > Perhaps qemu_system_vmstop_request_prepare + > > qemu_system_vmstop_request(RUN_STATE_PAUSED) instead of exit? Those two > > functions are thread-safe. > > There is no need to stop when replay file is over (because we cannot replay more). > Should we send shutdown request instead? I thought about it. I think no, because shutdown is irreversible (see runstate_needs_reset). Just pausing seemed to be the right compromise, and then the next "cont" can run the VM out of replay mode. Paolo