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. > > 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 retained > to support version 4 images. > > Signed-off-by: David Gibson <da...@gibson.dropbear.id.au> > --- > 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 -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg