This allows a specific cpu to report the size of the ELF notes it needs to dump its state, alongside get_dump_info.
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 0b6bb42dc2c..31f1674d324 100644 --- a/include/hw/core/sysemu-cpu-ops.h +++ b/include/hw/core/sysemu-cpu-ops.h @@ -101,6 +101,13 @@ typedef struct SysemuCPUOps { */ int (*get_dump_info)(const CPUState *cpu, ArchDumpInfo *info, const struct 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, or -1 if this is not supported. + */ + ssize_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.43.0
