summaryrefslogtreecommitdiff
path: root/target-arm/cpu.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2013-04-19 12:24:19 +0100
committerPeter Maydell <peter.maydell@linaro.org>2013-04-19 12:24:19 +0100
commit3cc1d20823e8677038c5bb5db10910f6271b1883 (patch)
treed87ff547e6affa2312844d3b53221f0336116a8e /target-arm/cpu.c
parent3b3284486be6898937395fac3ddbd2e68c5cb52f (diff)
downloadqemu-3cc1d20823e8677038c5bb5db10910f6271b1883.tar.gz
target-arm: port ARM CPU save/load to use VMState
Port the ARM CPU save/load code to use VMState. Some state is saved in a slightly different order to simplify things -- for example arrays are saved one after the other rather than 'striped', and we always save all 32 VFP registers even if the CPU happens to only have 16. Use one subsection for each feature. This means that we don't need to bump the version field each time that a new feature gets introduced. Signed-off-by: Juan Quintela <quintela@redhat.com> [PMM: fixed conflicts, updated to use cpu_class_set_vmsd(), updated with new/removed fields since original patch, changed to use custom VMStateInfo for cpsr rather than presave/postload hooks, corrected subsection names so vmload doesn't fail] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-arm/cpu.c')
-rw-r--r--target-arm/cpu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/target-arm/cpu.c b/target-arm/cpu.c
index a1e90939d6..496a59f5c0 100644
--- a/target-arm/cpu.c
+++ b/target-arm/cpu.c
@@ -814,6 +814,7 @@ static void arm_cpu_class_init(ObjectClass *oc, void *data)
cc->class_by_name = arm_cpu_class_by_name;
cc->do_interrupt = arm_cpu_do_interrupt;
+ cpu_class_set_vmsd(cc, &vmstate_arm_cpu);
}
static void cpu_register(const ARMCPUInfo *info)