qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/8] target-ppc: Convert ppc cpu savevm to VMSta


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH 2/8] target-ppc: Convert ppc cpu savevm to VMStateDescription
Date: Fri, 03 May 2013 13:29:28 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5

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 <address@hidden>
> ---
>  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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]