mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
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>
This commit is contained in:
parent
71dd7e69b3
commit
ef1df13087
4 changed files with 82 additions and 7 deletions
|
@ -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";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue