From e72629e5149aba6f44122ea6d2a803ef136a0c6b Mon Sep 17 00:00:00 2001 From: Janosch Frank Date: Thu, 9 Nov 2023 12:04:42 +0000 Subject: dump: Add arch cleanup function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some architectures (s390x) need to cleanup after a failed dump to be able to continue to run the vm. Add a cleanup function pointer and call it if it's set. Signed-off-by: Janosch Frank Reviewed-by: Thomas Huth Reviewed-by: Marc-André Lureau Message-ID: <20231109120443.185979-3-frankja@linux.ibm.com> Signed-off-by: Thomas Huth --- dump/dump.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'dump/dump.c') diff --git a/dump/dump.c b/dump/dump.c index ad5294e853..4819050764 100644 --- a/dump/dump.c +++ b/dump/dump.c @@ -96,6 +96,10 @@ uint64_t cpu_to_dump64(DumpState *s, uint64_t val) static int dump_cleanup(DumpState *s) { + if (s->dump_info.arch_cleanup_fn) { + s->dump_info.arch_cleanup_fn(s); + } + guest_phys_blocks_free(&s->guest_phys_blocks); memory_mapping_list_free(&s->list); close(s->fd); -- cgit 1.4.1