Am 04.05.2012 12:54, schrieb Juan Quintela: > This makes several changes: > - exports VMStateDescription vmstate_cpu non-static. > - makes sure that every cpu has a vmstate_cpu or cpu_save/load defined > - for the architecture that had nothing, it just register the cpu as > unmigratable. > - Depending on CPU_SAVE_VERSION we register old/new migration style > - Add copyrights to the new files > > Signed-off-by: Juan Quintela <quint...@redhat.com> > --- > exec.c | 2 ++ > target-alpha/machine.c | 12 +----------- > target-i386/machine.c | 2 +- > target-lm32/machine.c | 2 +- > target-m68k/machine.c | 21 +++++++++++++++++++++ > target-s390x/machine.c | 14 ++++++-------- > target-sh4/machine.c | 21 +++++++++++++++++++++ > target-xtensa/machine.c | 14 ++++++-------- > vmstate.h | 2 ++ > 9 files changed, 61 insertions(+), 29 deletions(-) > > diff --git a/exec.c b/exec.c > index cba333f..85f0d61 100644 > --- a/exec.c > +++ b/exec.c > @@ -722,6 +722,8 @@ void cpu_exec_init(CPUArchState *env) > #if defined(CPU_SAVE_VERSION) > register_savevm(NULL, "cpu", cpu_index, CPU_SAVE_VERSION, > cpu_save, cpu_load, env); > +#else > + vmstate_register(NULL, cpu_index, &vmstate_cpu, env); > #endif > #endif > }
We have QOM CPUState now, so please add a vmsd field to CPUClass instead of exporting global vmstate_cpu variables. It then matches what we do for former qdev devices and will in the future allow to compile this code only twice. Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg