aboutsummaryrefslogtreecommitdiff
path: root/include/sysemu
diff options
context:
space:
mode:
authorStephen Brennan <stephen.s.brennan@oracle.com>2023-09-18 16:32:32 -0700
committerMarc-André Lureau <marcandre.lureau@redhat.com>2023-11-02 18:05:02 +0400
commitd43a01db285fd10f9c429476eb9c63fa5e00f3cc (patch)
tree7681881c718c77c9bb9770a4b0cc74708ef354fa /include/sysemu
parent4d7dd4ed4f42e659a214e4f81c1a15ee991352df (diff)
dump: Allow directly outputting raw kdump format
The flattened format (currently output by QEMU) is used by makedumpfile only when it is outputting a vmcore to a file which is not seekable. The flattened format functions essentially as a set of instructions of the form "seek to the given offset, then write the given bytes out". The flattened format can be reconstructed using makedumpfile -R, or makedumpfile-R.pl, but it is a slow process because it requires copying the entire vmcore. The flattened format can also be directly read by crash, but still, it requires a lengthy reassembly phase. To sum up, the flattened format is not an ideal one: it should only be used on files which are actually not seekable. This is the exact strategy which makedumpfile uses, as seen in the implementation of "write_buffer()" in makedumpfile [1]. However, QEMU has always used the flattened format. For compatibility it is best not to change the default output format without warning. So, add a flag to DumpState which changes the output to use the normal (i.e. raw) format. This flag will be added to the QMP and HMP commands in the next change. [1]: https://github.com/makedumpfile/makedumpfile/blob/f23bb943568188a2746dbf9b6692668f5a2ac3b6/makedumpfile.c#L5008-L5040 Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> [ Marc-André: replace loff_t with off_t ] Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20230918233233.1431858-3-stephen.s.brennan@oracle.com>
Diffstat (limited to 'include/sysemu')
-rw-r--r--include/sysemu/dump.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sysemu/dump.h b/include/sysemu/dump.h
index e27af8fb34..d702854853 100644
--- a/include/sysemu/dump.h
+++ b/include/sysemu/dump.h
@@ -157,6 +157,7 @@ typedef struct DumpState {
MemoryMappingList list;
bool resume;
bool detached;
+ bool kdump_raw;
hwaddr memory_offset;
int fd;