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/dump-cpu-ops.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/hw/core/dump-cpu-ops.h b/include/hw/core/dump-cpu-ops.h index 5e8a89cbbea..d9716a72529 100644 --- a/include/hw/core/dump-cpu-ops.h +++ b/include/hw/core/dump-cpu-ops.h @@ -19,6 +19,13 @@ typedef struct DumpCPUOps { */ int (*get_dump_info)(const CPUState *cs, 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 *cs, int class, int machine, + int nr_cpus); } DumpCPUOps; #endif /* DUMP_CPU_OPS_H */ -- 2.43.0
