target-sparc: Convert to VMStateDescription

Convert the SPARC CPU from cpu_load/save functions to VMStateDescription.
We preserve migration compatibility with the previous version
(required for SPARC32 but not necessarily for SPARC64).

Backports commit df32c8d436d4eb3f40b00647ca0df2bbc7f6bf6f from qemu
This commit is contained in:
Juan Quintela 2018-02-17 21:06:18 -05:00 committed by Lioncash
parent a734ef8156
commit 7da263e4ea
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7
2 changed files with 2 additions and 6 deletions

View file

@ -892,6 +892,8 @@ static void sparc_cpu_class_init(struct uc_struct *uc, ObjectClass *oc, void *da
cc->do_unassigned_access = sparc_cpu_unassigned_access;
cc->do_unaligned_access = sparc_cpu_do_unaligned_access;
cc->get_phys_page_debug = sparc_cpu_get_phys_page_debug;
// Unicorn: commented out
//cc->vmsd = &vmstate_sparc_cpu;
#endif
}

View file

@ -374,10 +374,6 @@ struct CPUTimer
typedef struct CPUTimer CPUTimer;
struct QEMUFile;
void cpu_put_timer(struct QEMUFile *f, CPUTimer *s);
void cpu_get_timer(struct QEMUFile *f, CPUTimer *s);
typedef struct CPUSPARCState CPUSPARCState;
struct CPUSPARCState {
@ -609,8 +605,6 @@ static inline CPUSPARCState *cpu_init(struct uc_struct *uc, const char *cpu_mode
#define cpu_signal_handler cpu_sparc_signal_handler
#define cpu_list sparc_cpu_list
#define CPU_SAVE_VERSION 7
/* MMU modes definitions */
#if defined (TARGET_SPARC64)
#define MMU_USER_IDX 0