Commit b2b8ab9832 for qemu.org

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

    hw/core/sysemu-cpu-ops: add get_note_size

    This allows a specific cpu to report the size of the ELF notes it needs
    to dump its state, alongside get_dump_info.

    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-15-pierrick.bouvier@oss.qualcomm.com
    Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>

diff --git a/include/hw/core/sysemu-cpu-ops.h b/include/hw/core/sysemu-cpu-ops.h
index 1d4a04ff36..4654a2a43d 100644
--- a/include/hw/core/sysemu-cpu-ops.h
+++ b/include/hw/core/sysemu-cpu-ops.h
@@ -99,6 +99,13 @@ typedef struct SysemuCPUOps {
      */
     void (*get_dump_info)(const CPUState *cpu, ArchDumpInfo *info,
                           const GuestPhysBlockList *guest_phys_blocks);
+    /**
+     * @get_note_size: returns the size of the ELF notes needed to dump
+     * @nr_cpus cpus, for the ELF @class and @machine reported by
+     * @get_dump_info. Must be set if @get_dump_info is set.
+     */
+    size_t (*get_note_size)(const CPUState *cpu, int class, int machine,
+                            int nr_cpus);
     /**
      * @internal_is_big_endian: Callback to return %true if a CPU which supports
      * runtime configurable endianness is currently big-endian.