From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57997) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkSvD-000854-J1 for qemu-devel@nongnu.org; Thu, 15 Sep 2016 05:25:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bkSv8-0000Lf-F3 for qemu-devel@nongnu.org; Thu, 15 Sep 2016 05:25:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32966) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkSv8-0000LS-8u for qemu-devel@nongnu.org; Thu, 15 Sep 2016 05:25:26 -0400 References: <20160915090042.6440.22516.stgit@PASHA-ISP> <20160915090105.6440.95131.stgit@PASHA-ISP> From: Paolo Bonzini Message-ID: Date: Thu, 15 Sep 2016 11:25:20 +0200 MIME-Version: 1.0 In-Reply-To: <20160915090105.6440.95131.stgit@PASHA-ISP> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 04/10] replay: save/load initial state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: 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 15/09/2016 11:01, Pavel Dovgalyuk wrote: > +{ > + if (replay_mode == REPLAY_MODE_RECORD) { > + QDict *opts = qdict_new(); > + qdict_put(opts, "name", qstring_from_str("replay_init")); > + hmp_savevm(cur_mon, opts); > + QDECREF(opts); > + } else if (replay_mode == REPLAY_MODE_PLAY) { > + load_vmstate("replay_init"); See my other message about a suggestion to remove the hardcoded snapshot name. Also, I think the return value of load_vmstate and hmp_savevm should be checked. > + } > +} > diff --git a/vl.c b/vl.c > index 1c68779..6698d88 100644 > --- a/vl.c > +++ b/vl.c > @@ -4593,6 +4593,8 @@ int main(int argc, char **argv, char **envp) > if (load_vmstate(loadvm) < 0) { > autostart = 0; > } > + } else { > + replay_vmstate_init(); > } Should -loadvm be incompatible with -rr? Paolo