For now, we keep the global cpu_get_dump_info symbol defined.

Signed-off-by: Pierrick Bouvier <[email protected]>
---
 target/s390x/arch_dump.c      | 15 +++++++++++++--
 target/s390x/cpu-system.c     |  1 +
 target/s390x/s390x-internal.h |  2 ++
 3 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/target/s390x/arch_dump.c b/target/s390x/arch_dump.c
index 2c26e992959..19810dcbae8 100644
--- a/target/s390x/arch_dump.c
+++ b/target/s390x/arch_dump.c
@@ -19,6 +19,7 @@
 #include "system/dump.h"
 #include "kvm/kvm_s390x.h"
 #include "target/s390x/kvm/pv.h"
+#include "hw/core/dump-cpu-ops.h"
 
 struct S390xUserRegsStruct {
     uint64_t psw[2];
@@ -449,8 +450,8 @@ static void arch_cleanup(DumpState *s)
     }
 }
 
-int cpu_get_dump_info(ArchDumpInfo *info,
-                      const struct GuestPhysBlockList *guest_phys_blocks)
+static int s390_get_dump_info(const CPUState *cs, ArchDumpInfo *info,
+                              const GuestPhysBlockList *guest_phys_blocks)
 {
     info->d_machine = EM_S390;
     info->d_endian = ELFDATA2MSB;
@@ -469,6 +470,16 @@ int cpu_get_dump_info(ArchDumpInfo *info,
     return 0;
 }
 
+const DumpCPUOps s390_dump_ops = {
+    .get_dump_info = s390_get_dump_info,
+};
+
+int cpu_get_dump_info(ArchDumpInfo *info,
+                      const struct GuestPhysBlockList *guest_phys_blocks)
+{
+    return s390_get_dump_info(first_cpu, info, guest_phys_blocks);
+}
+
 ssize_t cpu_get_note_size(int class, int machine, int nr_cpus)
 {
     int name_size = 8; /* "LINUX" or "CORE" + pad */
diff --git a/target/s390x/cpu-system.c b/target/s390x/cpu-system.c
index d963d9e940e..e7c022b3fb5 100644
--- a/target/s390x/cpu-system.c
+++ b/target/s390x/cpu-system.c
@@ -195,6 +195,7 @@ void s390_cpu_system_class_init(CPUClass *cc)
 
     scc->load_normal = s390_cpu_load_normal;
     cc->sysemu_ops = &s390_sysemu_ops;
+    cc->dump_ops = &s390_dump_ops;
 }
 
 static bool disabled_wait(CPUState *cpu)
diff --git a/target/s390x/s390x-internal.h b/target/s390x/s390x-internal.h
index da60b2b1fd4..1c5aaccfa49 100644
--- a/target/s390x/s390x-internal.h
+++ b/target/s390x/s390x-internal.h
@@ -249,6 +249,8 @@ void s390_cpu_finalize(Object *obj);
 void s390_cpu_system_class_init(CPUClass *cc);
 void s390_cpu_machine_reset_cb(void *opaque);
 bool s390_cpu_has_work(CPUState *cs);
+
+extern const struct DumpCPUOps s390_dump_ops;
 #endif /* CONFIG_USER_ONLY */
 
 
-- 
2.43.0


Reply via email to