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 <[email protected]>
Reviewed-by: Marc-AndrĂ© Lureau <[email protected]>
Signed-off-by: Pierrick Bouvier <[email protected]>
---
 include/hw/core/sysemu-cpu-ops.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/include/hw/core/sysemu-cpu-ops.h b/include/hw/core/sysemu-cpu-ops.h
index 1d4a04ff361..4654a2a43d2 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.
-- 
2.47.3


Reply via email to