From: Thomas Huth <thuth@redhat.com>
To: Janosch Frank <frankja@linux.ibm.com>, qemu-devel@nongnu.org
Cc: qemu-s390x@nongnu.org, marcandre.lureau@redhat.com,
imbrenda@linux.ibm.com
Subject: Re: [PATCH v2 2/3] dump: Add arch cleanup function
Date: Thu, 9 Nov 2023 14:15:18 +0100 [thread overview]
Message-ID: <74bb0f66-4383-4627-aedb-859383df1ba8@redhat.com> (raw)
In-Reply-To: <20231109120443.185979-3-frankja@linux.ibm.com>
On 09/11/2023 13.04, Janosch Frank wrote:
> 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 <frankja@linux.ibm.com>
> ---
> dump/dump.c | 4 ++++
> include/sysemu/dump-arch.h | 1 +
> 2 files changed, 5 insertions(+)
>
> diff --git a/dump/dump.c b/dump/dump.c
> index d355ada62e..9eeb7ab453 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);
> diff --git a/include/sysemu/dump-arch.h b/include/sysemu/dump-arch.h
> index 59bbc9be38..743916e46c 100644
> --- a/include/sysemu/dump-arch.h
> +++ b/include/sysemu/dump-arch.h
> @@ -24,6 +24,7 @@ typedef struct ArchDumpInfo {
> void (*arch_sections_add_fn)(DumpState *s);
> uint64_t (*arch_sections_write_hdr_fn)(DumpState *s, uint8_t *buff);
> int (*arch_sections_write_fn)(DumpState *s, uint8_t *buff);
> + void (*arch_cleanup_fn)(DumpState *s);
> } ArchDumpInfo;
>
> struct GuestPhysBlockList; /* memory_mapping.h */
Reviewed-by: Thomas Huth <thuth@redhat.com>
next prev parent reply other threads:[~2023-11-09 13:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-09 12:04 [PATCH v2 0/3] dump: Arch info function pointer addition and cleanup Janosch Frank
2023-11-09 12:04 ` [PATCH v2 1/3] target/s390x/dump: Remove unneeded dump info function pointer init Janosch Frank
2023-11-09 13:14 ` Thomas Huth
2023-11-09 12:04 ` [PATCH v2 2/3] dump: Add arch cleanup function Janosch Frank
2023-11-09 13:15 ` Thomas Huth [this message]
2023-11-09 12:04 ` [PATCH v2 3/3] target/s390x/arch_dump: Add arch cleanup function for PV dumps Janosch Frank
2023-11-09 12:24 ` Claudio Imbrenda
2023-11-09 13:18 ` Thomas Huth
2023-11-10 13:35 ` [PATCH v2 0/3] dump: Arch info function pointer addition and cleanup Marc-André Lureau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=74bb0f66-4383-4627-aedb-859383df1ba8@redhat.com \
--to=thuth@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=marcandre.lureau@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).