summaryrefslogtreecommitdiffstats
path: root/target-s390x/cpu.c
diff options
context:
space:
mode:
authorThomas Huth <thuth@linux.vnet.ibm.com>2014-09-30 10:58:42 +0200
committerCornelia Huck <cornelia.huck@de.ibm.com>2014-10-10 13:31:51 +0200
commitef1df13087768c0ab4010355595b0e3dd91bbd3c (patch)
tree978d06e47080abb764f8f42d22f5157f64984ee1 /target-s390x/cpu.c
parent71dd7e69b30dc5024a8d891e7011173a81fe7a72 (diff)
downloadhqemu-ef1df13087768c0ab4010355595b0e3dd91bbd3c.zip
hqemu-ef1df13087768c0ab4010355595b0e3dd91bbd3c.tar.gz
s390x/migration: migrate CPU state
This patch provides the cpu save information for dumps and later life migration and enables migration of the CPU state. The code is based on earlier work from Christian Borntraeger and Jason Herne. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com> Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com> [provide cpu_post_load()] Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> CC: Andreas Faerber <afaerber@suse.de> CC: Christian Borntraeger <borntraeger@de.ibm.com> CC: Jason J. Herne <jjherne@us.ibm.com> Tested-by: Christian Borntraeger <borntraeger@de.ibm.com> [Cornelia Huck: tweaked cpu_post_load() comment] Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'target-s390x/cpu.c')
-rw-r--r--target-s390x/cpu.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c
index ec7df90..d2f6312 100644
--- a/target-s390x/cpu.c
+++ b/target-s390x/cpu.c
@@ -292,11 +292,6 @@ unsigned int s390_cpu_set_state(uint8_t cpu_state, S390CPU *cpu)
}
#endif
-static const VMStateDescription vmstate_s390_cpu = {
- .name = "cpu",
- .unmigratable = 1,
-};
-
static void s390_cpu_class_init(ObjectClass *oc, void *data)
{
S390CPUClass *scc = S390_CPU_CLASS(oc);
@@ -323,11 +318,11 @@ static void s390_cpu_class_init(ObjectClass *oc, void *data)
cc->handle_mmu_fault = s390_cpu_handle_mmu_fault;
#else
cc->get_phys_page_debug = s390_cpu_get_phys_page_debug;
+ cc->vmsd = &vmstate_s390_cpu;
cc->write_elf64_note = s390_cpu_write_elf64_note;
cc->write_elf64_qemunote = s390_cpu_write_elf64_qemunote;
cc->cpu_exec_interrupt = s390_cpu_exec_interrupt;
#endif
- dc->vmsd = &vmstate_s390_cpu;
cc->gdb_num_core_regs = S390_NUM_CORE_REGS;
cc->gdb_core_xml_file = "s390x-core64.xml";
}
OpenPOWER on IntegriCloud