qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Page alignment & memory regions expectations
@ 2022-08-24 12:43 Marc-André Lureau
  2022-08-24 16:42 ` David Hildenbrand
  0 siblings, 1 reply; 7+ messages in thread
From: Marc-André Lureau @ 2022-08-24 12:43 UTC (permalink / raw)
  To: QEMU; +Cc: Paolo Bonzini, Stefan Berger, David Hildenbrand, qiaonuohan

[-- Attachment #1: Type: text/plain, Size: 1255 bytes --]

Hi,

tpm-crb creates a "tpm-crb-cmd" RAM memory region that is not page aligned.
Apparently, this is not a problem for QEMU in general. However, it crashes
kdump'ing in dump.c:get_next_page, as it expects GuestPhysBlock to be
page-aligned. (see also bug
https://bugzilla.redhat.com/show_bug.cgi?id=2120480)

Here is some relevant DEBUG_GUEST_PHYS_REGION_ADD log:
guest_phys_block_add_section: target_start=00000000fd000000
target_end=00000000fe000000: added (count: 3)
guest_phys_block_add_section: target_start=00000000fed40080
target_end=00000000fed41000: added (count: 4)
guest_phys_block_add_section: target_start=00000000fffc0000
target_end=0000000100000000: added (count: 5)

I am looking for ideas on how to solve this crash.

Should qemu enforce that memory regions are target page-aligned? In which
case, TPM CRB MMIO region would overlap with the RAM region, and I wonder
how that turns out to be, and if other devices would be impacted etc

Or should kdump learn to handle non-aligned blocks somehow? I think that
option should make a reasonable solution, as long as we only have
empty/zero-memory "gaps". Handling other cases of joint or overlapping
regions seems more difficult.

thanks

-- 
Marc-André Lureau

[-- Attachment #2: Type: text/html, Size: 1625 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-08-25 12:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-24 12:43 Page alignment & memory regions expectations Marc-André Lureau
2022-08-24 16:42 ` David Hildenbrand
2022-08-24 19:55   ` Peter Maydell
2022-08-25  7:26     ` David Hildenbrand
2022-08-25 11:47       ` Peter Maydell
2022-08-25 11:57         ` David Hildenbrand
2022-08-25 12:18           ` Peter Maydell

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).