[PATCH v2 qemu 0/3] Allow dump-guest-memory to output standard kdump format

Stephen Brennan posted 3 patches 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230914010315.945705-1-stephen.s.brennan@oracle.com
Maintainers: "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Dr. David Alan Gilbert" <dave@treblig.org>, Eric Blake <eblake@redhat.com>, Markus Armbruster <armbru@redhat.com>
There is a newer version of this series
dump/dump-hmp-cmds.c  |  8 +++-
dump/dump.c           | 86 ++++++++++++++++++++++++++++++-------------
hmp-commands.hx       |  7 +++-
include/sysemu/dump.h |  3 +-
qapi/dump.json        | 14 ++++++-
5 files changed, 87 insertions(+), 31 deletions(-)
[PATCH v2 qemu 0/3] Allow dump-guest-memory to output standard kdump format
Posted by Stephen Brennan 8 months ago
Hello all,

This is the second version of my patch series about the kdump format,
you can see the first version here [1].

The current output format for dump-guest-memory's kdump compressed
format is actually the "makedumpfile flattened" format. It was done
intentionally to allow the flexibility to write to non-seekable file
descriptors, like pipes [2], without using temporary files. Currently
libvirt uses this ability when VIR_DUMP_BYPASS_CACHE flag is set, to
avoid the dump process using page cache. The standard kdump output
format needs the page cache so that it can seek back and forth as part
of writing the dump file.

So the default kdump dump format cannot be changed to the standard
format. This patch series adds the ability to use the standard format,
and adds a QMP / HMP argument to enable it.

An open question for Daniel et al.:

Would it be possible to make flattened the default only for libvirt? I
totally agree that this would be a bad backward incompatible change
there. But for QMP / HMP commands, I think using the standard, broadly
compatible format as the default is important for user friendliness. If
a user needs to know the difference between flavors of kdump formats
like the flattened format, in order to set the correct option, then
we've already lost.

Changes from v1 to v2:
- Keep the default as the flattened format
- Add QMP / HMP arguments for "reassembled"

[1]: https://lore.kernel.org/qemu-devel/20230717163855.7383-1-stephen.s.brennan@oracle.com/
[2]: https://lore.kernel.org/qemu-devel/1390890126-17377-1-git-send-email-qiaonuohan@cn.fujitsu.com/
-> see "changes from v4 to v5" in this patch

Stephen Brennan (3):
  dump: Pass DumpState to write_ functions
  dump: Allow directly outputting reassembled kdumps
  dump: Add qmp argument "reassembled"

 dump/dump-hmp-cmds.c  |  8 +++-
 dump/dump.c           | 86 ++++++++++++++++++++++++++++++-------------
 hmp-commands.hx       |  7 +++-
 include/sysemu/dump.h |  3 +-
 qapi/dump.json        | 14 ++++++-
 5 files changed, 87 insertions(+), 31 deletions(-)

-- 
2.39.3
Re: [PATCH v2 qemu 0/3] Allow dump-guest-memory to output standard kdump format
Posted by Daniel P. Berrangé 8 months ago
On Wed, Sep 13, 2023 at 06:03:12PM -0700, Stephen Brennan wrote:
> Hello all,
> 
> This is the second version of my patch series about the kdump format,
> you can see the first version here [1].
> 
> The current output format for dump-guest-memory's kdump compressed
> format is actually the "makedumpfile flattened" format. It was done
> intentionally to allow the flexibility to write to non-seekable file
> descriptors, like pipes [2], without using temporary files. Currently
> libvirt uses this ability when VIR_DUMP_BYPASS_CACHE flag is set, to
> avoid the dump process using page cache. The standard kdump output
> format needs the page cache so that it can seek back and forth as part
> of writing the dump file.
> 
> So the default kdump dump format cannot be changed to the standard
> format. This patch series adds the ability to use the standard format,
> and adds a QMP / HMP argument to enable it.
> 
> An open question for Daniel et al.:
> 
> Would it be possible to make flattened the default only for libvirt? I
> totally agree that this would be a bad backward incompatible change
> there. But for QMP / HMP commands, I think using the standard, broadly
> compatible format as the default is important for user friendliness. If
> a user needs to know the difference between flavors of kdump formats
> like the flattened format, in order to set the correct option, then
> we've already lost.

The default is 'elf' - any use of kdump formats is already an opt-in,
and with the new kdump variants represented as enums, the user can
just specify which they want explicitly.


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|