]> git.proxmox.com Git - mirror_qemu.git/commit
dump: fix kdump to work over non-aligned blocks
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Mon, 5 Sep 2022 12:06:21 +0000 (16:06 +0400)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 6 Oct 2022 15:31:54 +0000 (19:31 +0400)
commit94d788408d2d5a6474c99b2c9cf06913b9db7c58
tree2ca9756252558c1ca0a40cb8b07401117ed398b3
parent08df343874fcddd260021a04ce3c5a34f2c48164
dump: fix kdump to work over non-aligned blocks

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>
Acked-by: David Hildenbrand <david@redhat.com>
dump/dump.c