From: Stefan Berger <stefanb@linux.ibm.com>
To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
qiaonuohan@cn.fujitsu.com,
Peter Maydell <peter.maydell@linaro.org>,
Stefan Berger <stefanb@linux.vnet.ibm.com>,
David Hildenbrand <david@redhat.com>
Subject: Re: [PATCH v2 2/2] dump: fix kdump to work over non-aligned blocks
Date: Tue, 6 Sep 2022 16:11:38 -0400 [thread overview]
Message-ID: <9b1510ce-bac0-e3f7-8efa-db5ce0452ccb@linux.ibm.com> (raw)
In-Reply-To: <20220905125741.95516-3-marcandre.lureau@redhat.com>
On 9/5/22 08:57, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> Rewrite get_next_page() to work over non-aligned blocks. When it
> encounters non aligned addresses, it will try to fill a page provided by
> the caller.
>
> This solves a kdump crash with "tpm-crb-cmd" RAM memory region,
> qemu-kvm: ../dump/dump.c:1162: _Bool get_next_page(GuestPhysBlock **,
> uint64_t *, uint8_t **, DumpState *): Assertion `(block->target_start &
> ~target_page_mask) == 0' failed.
>
> because:
> guest_phys_block_add_section: target_start=00000000fed40080 target_end=00000000fed41000: added (count: 4)
>
> Fixes:
> https://bugzilla.redhat.com/show_bug.cgi?id=2120480
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> dump/dump.c | 79 +++++++++++++++++++++++++++++++++++++----------------
> 1 file changed, 56 insertions(+), 23 deletions(-)
>
> diff --git a/dump/dump.c b/dump/dump.c
> index f465830371..500357bafe 100644
> --- a/dump/dump.c
> +++ b/dump/dump.c
> @@ -1094,50 +1094,81 @@ static uint64_t dump_pfn_to_paddr(DumpState *s, uint64_t pfn)
> }
>
> /*
> - * exam every page and return the page frame number and the address of the page.
> - * bufptr can be NULL. note: the blocks here is supposed to reflect guest-phys
> - * blocks, so block->target_start and block->target_end should be interal
> - * multiples of the target page size.
> + * Return the page frame number and the page content in *bufptr. bufptr can be
> + * NULL. If not NULL, *bufptr must contains a target page size of pre-allocated
contains->contain
Otherwise I don't have much to say about it...
next prev parent reply other threads:[~2022-09-06 20:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-05 12:57 [PATCH v2 0/2] Fix dumping in kdump format with non-aligned memory marcandre.lureau
2022-09-05 12:57 ` [PATCH v2 1/2] dump: simplify a bit kdump get_next_page() marcandre.lureau
2022-09-05 13:12 ` David Hildenbrand
2022-09-05 13:27 ` Peter Maydell
2022-09-05 13:33 ` Marc-André Lureau
2022-09-05 12:57 ` [PATCH v2 2/2] dump: fix kdump to work over non-aligned blocks marcandre.lureau
2022-09-06 20:11 ` Stefan Berger [this message]
2022-09-29 7:54 ` Marc-André Lureau
2022-10-06 15:05 ` David Hildenbrand
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=9b1510ce-bac0-e3f7-8efa-db5ce0452ccb@linux.ibm.com \
--to=stefanb@linux.ibm.com \
--cc=david@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qiaonuohan@cn.fujitsu.com \
--cc=stefanb@linux.vnet.ibm.com \
/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).