From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35025) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYEBF-00037y-Cd for qemu-devel@nongnu.org; Fri, 03 May 2013 07:29:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UYEBC-0001yk-68 for qemu-devel@nongnu.org; Fri, 03 May 2013 07:29:37 -0400 Message-ID: <51839F98.8070105@suse.de> Date: Fri, 03 May 2013 13:29:28 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1367545092-19980-1-git-send-email-david@gibson.dropbear.id.au> <1367545092-19980-3-git-send-email-david@gibson.dropbear.id.au> In-Reply-To: <1367545092-19980-3-git-send-email-david@gibson.dropbear.id.au> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 2/8] target-ppc: Convert ppc cpu savevm to VMStateDescription List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: aik@ozlabs.ru, qemu-devel@nongnu.org, qemu-ppc@nongnu.org, agraf@suse.de, quintela@redhat.com Am 03.05.2013 03:38, schrieb David Gibson: > The savevm code for the powerpc cpu emulation is currently based around > the old register_savevm() rather than register_vmstate() method. It's = also > rather broken, missing some important state on some CPU models. >=20 > This patch completely rewrites the savevm for target-ppc, using the new > VMStateDescription approach. Exactly what needs to be saved in what > configurations has been more carefully examined, too. This introduces = a > new version (5) of the cpu save format. The old load function is retai= ned > to support version 4 images. >=20 > Signed-off-by: David Gibson > --- > target-ppc/cpu.h | 9 +- > target-ppc/machine.c | 542 ++++++++++++++++++++++++++++++++++++++++++= -------- > 2 files changed, 460 insertions(+), 91 deletions(-) [...] > diff --git a/target-ppc/machine.c b/target-ppc/machine.c > index 2d10adb..594fe6a 100644 > --- a/target-ppc/machine.c > +++ b/target-ppc/machine.c [...] > +void cpu_save(QEMUFile *f, void *opaque) > +{ > + vmstate_save_state(f, &vmstate_cpu, opaque); > + > +} > + > +int cpu_load(QEMUFile *f, void *opaque, int version_id) > +{ > + return vmstate_load_state(f, &vmstate_cpu, opaque, version_id); > +} Please drop cpu_{save,load}() and use the VMStateDescription-based registration mechanism cpu_class_set_vmsd() from PowerPCCPU's instance_init in translate_init.c. I'm pretty certain I CC'ed you on that series... Thanks, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg