Commit e9030287bb for qemu.org

commit e9030287bb70d61d5b7b48eb33043e00d352998b
Author: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Date:   Wed Oct 21 11:12:42 2026 -0700

    target/s390x: implement get_note_size sysemu op

    For now, we keep the global cpu_get_note_size symbol defined.

    Reviewed-by: Anton Johansson <anjo@rev.ng>
    Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
    Link: https://lore.kernel.org/qemu-devel/20261021181244.867840-20-pierrick.bouvier@oss.qualcomm.com
    Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>

diff --git a/target/s390x/arch_dump.c b/target/s390x/arch_dump.c
index 15299dd7a2..5092835afc 100644
--- a/target/s390x/arch_dump.c
+++ b/target/s390x/arch_dump.c
@@ -468,7 +468,8 @@ void s390_get_dump_info(const CPUState *cs, ArchDumpInfo *info,
     }
 }

-ssize_t cpu_get_note_size(int class, int machine, int nr_cpus)
+size_t s390_get_note_size(const CPUState *cs, int class, int machine,
+                          int nr_cpus)
 {
     int name_size = 8; /* "LINUX" or "CORE" + pad */
     size_t elf_note_size = 0;
@@ -494,3 +495,8 @@ ssize_t cpu_get_note_size(int class, int machine, int nr_cpus)

     return (elf_note_size) * nr_cpus;
 }
+
+ssize_t cpu_get_note_size(int class, int machine, int nr_cpus)
+{
+    return s390_get_note_size(first_cpu, class, machine, nr_cpus);
+}
diff --git a/target/s390x/cpu-system.c b/target/s390x/cpu-system.c
index 965f5cf29a..784bf4e90b 100644
--- a/target/s390x/cpu-system.c
+++ b/target/s390x/cpu-system.c
@@ -187,6 +187,7 @@ static const struct SysemuCPUOps s390_sysemu_ops = {
     .get_crash_info = s390_cpu_get_crash_info,
     .write_elf64_note = s390_cpu_write_elf64_note,
     .get_dump_info = s390_get_dump_info,
+    .get_note_size = s390_get_note_size,
     .legacy_vmsd = &vmstate_s390_cpu,
 };

diff --git a/target/s390x/s390x-internal.h b/target/s390x/s390x-internal.h
index 5bfc37fc46..9dd2243d48 100644
--- a/target/s390x/s390x-internal.h
+++ b/target/s390x/s390x-internal.h
@@ -252,6 +252,8 @@ bool s390_cpu_has_work(CPUState *cs);

 void s390_get_dump_info(const CPUState *cs, ArchDumpInfo *info,
                         const GuestPhysBlockList *guest_phys_blocks);
+size_t s390_get_note_size(const CPUState *cs, int class, int machine,
+                          int nr_cpus);
 #endif /* CONFIG_USER_ONLY */