On 10/25/2011 07:00 AM, Juan Quintela wrote:
> 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
> 
> Signed-off-by: Juan Quintela <quint...@redhat.com>
> CC: Richard Henderson <r...@twiddle.net>
> CC: Michael Walle <mich...@walle.cc>
> CC: Paul Brook <p...@codesourcery.com>
> CC: Alexander Graf <ag...@suse.de>
> CC: Aurelien Jarno <aurel...@aurel32.net>
> CC: Max Filippov <jcmvb...@gmail.com>
> ---
>  exec.c                  |    2 ++
>  hw/hw.h                 |    2 ++
>  target-alpha/machine.c  |   12 +-----------
>  target-i386/machine.c   |    2 +-
>  target-lm32/machine.c   |    2 +-
>  target-m68k/machine.c   |   10 ++++++++++
>  target-s390x/machine.c  |   14 ++++++--------
>  target-sh4/machine.c    |   10 ++++++++++
>  target-xtensa/machine.c |   14 ++++++--------

...

> --- a/target-alpha/machine.c
> +++ b/target-alpha/machine.c
> @@ -68,20 +68,10 @@ static VMStateField vmstate_cpu_fields[] = {
>      VMSTATE_END_OF_LIST()
>  };
> 
> -static const VMStateDescription vmstate_cpu = {
> +const VMStateDescription vmstate_cpu = {
>      .name = "cpu",
>      .version_id = 1,
>      .minimum_version_id = 1,
>      .minimum_version_id_old = 1,
>      .fields = vmstate_cpu_fields,
>  };
> -
> -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);
> -}

Acked-by: Richard Henderson <r...@twiddle.net>


r~

Reply via email to