Patchwork [qom-cpu,v3,6/6] cpu: Guard cpu_{save, load}() definitions

login
register
mail settings
Submitter Andreas Färber
Date June 18, 2013, 12:29 a.m.
Message ID <1371515385-32203-7-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/252075/
State New
Headers show

Comments

Andreas Färber - June 18, 2013, 12:29 a.m.
A few targets already managed to implement cpu_save() and cpu_load()
without defining CPU_SAVE_VERSION that causes them to be registered.

Guard the prototypes with CPU_SAVE_VERSION to avoid this happening again
until all targets are converted to VMState (or QIDL).

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 include/qemu-common.h | 2 ++
 1 file changed, 2 insertions(+)
Juan Quintela - June 18, 2013, 11:51 a.m.
Andreas Färber <afaerber@suse.de> wrote:
> A few targets already managed to implement cpu_save() and cpu_load()
> without defining CPU_SAVE_VERSION that causes them to be registered.
>
> Guard the prototypes with CPU_SAVE_VERSION to avoid this happening again
> until all targets are converted to VMState (or QIDL).
>
> Signed-off-by: Andreas Färber <afaerber@suse.de>

Reviewed-by: Juan Quintela <quintela@redhat.com>

Patch

diff --git a/include/qemu-common.h b/include/qemu-common.h
index 3c91375..6010bba 100644
--- a/include/qemu-common.h
+++ b/include/qemu-common.h
@@ -279,8 +279,10 @@  bool tcg_enabled(void);
 void cpu_exec_init_all(void);
 
 /* CPU save/load.  */
+#ifdef CPU_SAVE_VERSION
 void cpu_save(QEMUFile *f, void *opaque);
 int cpu_load(QEMUFile *f, void *opaque, int version_id);
+#endif
 
 /* Unblock cpu */
 void qemu_cpu_kick_self(void);