qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] dump: Add custom arch section support
@ 2022-03-10 11:16 Janosch Frank
  2022-03-10 11:16 ` [PATCH 1/5] dump: Allocate header Janosch Frank
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Janosch Frank @ 2022-03-10 11:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: marcandre.lureau, mhartmay, pbonzini

Architectures already provide custom cpu data via elf notes but
there's currently no way for an architecture to add other custom data
to dumps.

s390x for instance needs to store special data in the dump when
dumping protected guests so the vm owner can decrypt the dump and
access the vm data.

Similar to the cpu notes which work by using hooks we introduce new
hooks to add custom sections. The ArchDumpInfo struct now contains
three new functions hooks that the architectures can set:

void (*arch_sections_add_fn)(void *opaque);
This function can be used to manipulate the number of sections and the
size of the cummulative section data.

uint64_t (*arch_sections_write_hdr_fn)(void *opaque, uint8_t *buff);
This function is used to write the elf headers for the custom sections
so architectures can control all values in the section headers.

void (*arch_sections_write_fn)(void *opaque, uint8_t *buff);
Lastly this function is used to write out the section data.


To make section identification easier we also introduce section string
table support.

Based on:
https://lore.kernel.org/qemu-devel/20220310110854.2701-1-frankja@linux.ibm.com/T/#t


Janosch Frank (5):
  dump: Allocate header
  dump: Split write of section headers and data and add a prepare step
  dump: Reorder struct DumpState
  dump/dump: Add section string table support
  dump/dump: Add arch section support

 dump/dump.c                | 338 +++++++++++++++++++++++++++----------
 include/sysemu/dump-arch.h |  27 +++
 include/sysemu/dump.h      |  24 ++-
 3 files changed, 294 insertions(+), 95 deletions(-)

-- 
2.32.0



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

end of thread, other threads:[~2022-03-12 14:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-10 11:16 [PATCH 0/5] dump: Add custom arch section support Janosch Frank
2022-03-10 11:16 ` [PATCH 1/5] dump: Allocate header Janosch Frank
2022-03-11 20:06   ` Richard Henderson
2022-03-10 11:16 ` [PATCH 2/5] dump: Split write of section headers and data and add a prepare step Janosch Frank
2022-03-11 20:26   ` Richard Henderson
2022-03-10 11:16 ` [PATCH 3/5] dump: Reorder struct DumpState Janosch Frank
2022-03-11 20:13   ` Richard Henderson
2022-03-10 11:16 ` [PATCH 4/5] dump/dump: Add section string table support Janosch Frank
2022-03-12 14:18   ` Richard Henderson
2022-03-10 11:16 ` [PATCH 5/5] dump/dump: Add arch section support Janosch Frank

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