mirror of
https://github.com/mii443/qemu.git
synced 2025-12-09 14:08:32 +00:00
cpu: Introduce VMSTATE_CPU() macro for CPUState
To be used to embed common CPU state into CPU subclasses. Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
@@ -378,4 +378,18 @@ void cpu_reset_interrupt(CPUState *cpu, int mask);
|
||||
*/
|
||||
void cpu_resume(CPUState *cpu);
|
||||
|
||||
#ifdef CONFIG_SOFTMMU
|
||||
extern const struct VMStateDescription vmstate_cpu_common;
|
||||
#else
|
||||
#define vmstate_cpu_common vmstate_dummy
|
||||
#endif
|
||||
|
||||
#define VMSTATE_CPU() { \
|
||||
.name = "parent_obj", \
|
||||
.size = sizeof(CPUState), \
|
||||
.vmsd = &vmstate_cpu_common, \
|
||||
.flags = VMS_STRUCT, \
|
||||
.offset = 0, \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user