Received: from eggs.gnu.org ([2001:4830:134:3::10]:38195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIx8e-0006TH-ES for qemu-devel@nongnu.org; Wed, 04 Feb 2015 05:24:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YIx8b-00030b-3F for qemu-devel@nongnu.org; Wed, 04 Feb 2015 05:24:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53186) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIx8a-00030Q-SR for qemu-devel@nongnu.org; Wed, 04 Feb 2015 05:24:49 -0500 Date: Wed, 4 Feb 2015 11:24:44 +0100 From: Amit Shah Message-ID: <20150204102444.GB18603@grmbl.mre> References: <1421935300-8579-1-git-send-email-agraf@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1421935300-8579-1-git-send-email-agraf@suse.de> Subject: Re: [Qemu-devel] [PATCH v4 0/4] Migration Deciphering aid List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: quintela@redhat.com, qemu-devel@nongnu.org, pbonzini@redhat.com, alex.bennee@linaro.org, afaerber@suse.de On (Thu) 22 Jan 2015 [15:01:36], Alexander Graf wrote: > Migration is a black hole to most people. One of the biggest reasons for > this is that its protocol is a secret, undocumented sauce of code rolling > around random parts of the QEMU code base. > > But what if we simply exposed the description of how the format looks like > alongside the actual migration stream? This is what this patch set does. > > It adds a new section that comes after the end of stream marker (so that it > doesn't slow down migration) that contains a JSON description of the device > state description. > > Along with this patch set also comes a python script that can read said JSON > from a migration dump and decipher the device state and ram contents of the > migration dump using it. > > With this, you can now fully examine all glorious details that go over the > wire when virtual machine state gets dumped, such as during live migration. > > We discussed the approach taken here during KVM Forum 2013. Originally, my idea > was to include a special device that contains the JSON data which can be enabled > on demand. Anthony suggested however to just always include the description data > after the end marker which I think is a great idea. 'make check' fails with this series applied: migration/vmstate.o: In function `vmstate_save_state': qemu/migration/vmstate.c:289: undefined reference to `json_prop_str' qemu/migration/vmstate.c:290: undefined reference to `json_prop_int' qemu/migration/vmstate.c:291: undefined reference to `json_start_array' migration/vmstate.o: In function `vmsd_desc_field_start': qemu/migration/vmstate.c:245: undefined reference to `json_start_object' qemu/migration/vmstate.c:246: undefined reference to `json_prop_str' qemu/migration/vmstate.c:249: undefined reference to `json_prop_int' qemu/migration/vmstate.c:254: undefined reference to `json_prop_str' migration/vmstate.o: In function `vmsd_desc_field_end': qemu/migration/vmstate.c:275: undefined reference to `json_prop_int' qemu/migration/vmstate.c:276: undefined reference to `json_end_object' migration/vmstate.o: In function `vmstate_save_state': qemu/migration/vmstate.c:337: undefined reference to `json_end_array' migration/vmstate.o: In function `vmstate_subsection_save': qemu/migration/vmstate.c:423: undefined reference to `json_start_object' qemu/migration/vmstate.c:434: undefined reference to `json_end_object' qemu/migration/vmstate.c:419: undefined reference to `json_start_array' migration/vmstate.o: In function `vmsd_desc_field_start': qemu/migration/vmstate.c:251: undefined reference to `json_prop_int' migration/vmstate.o: In function `vmsd_desc_field_end': qemu/migration/vmstate.c:272: undefined reference to `json_end_object' migration/vmstate.o: In function `vmsd_desc_field_start': qemu/migration/vmstate.c:257: undefined reference to `json_start_object' migration/vmstate.o: In function `vmstate_subsection_save': qemu/migration/vmstate.c:441: undefined reference to `json_end_array' collect2: error: ld returned 1 exit status qemu/rules.mak:122: recipe for target 'tests/test-vmstate' failed make: *** [tests/test-vmstate] Error 1 Amit