On Thu, Oct 29, 2026 at 09:29:26AM +0100, Markus Armbruster wrote:
> Daniel P. Berrangé <[email protected]> writes:
>
> > Introduce a new subsystem "tldr" aka "thrifty live data recorder"
> > that will be able to continuously collect certain information at
> > runtime and dump that in a crash report when QEMU exits abnormally.
> > As a second use case, it will support manual triggering on interesting
> > events such as guest OS panic.
>
> What's manual about that?
Manual in the sense that the mgmt app has to explicitly request
the data recorder contents when a guest OS panics, vs automatic
dump when QEMU dies with a fatal signal.
> > diff --git a/qapi/qom.json b/qapi/qom.json
> > index 49f222796ab..1c9031fba9a 100644
> > --- a/qapi/qom.json
> > +++ b/qapi/qom.json
> > @@ -1233,6 +1233,19 @@
> > 'data': { '*pretty': 'bool',
> > '*close-action': 'MonitorQMPCloseAction' } }
> >
> > +##
> > +# @QTLDRConfigProperties:
> > +# Configuration for data recorder
> > +#
> > +# @crash-target: fully qualified path to perserve data recorder
> > +# contents on QEMU crash
>
> What's a "fully qualified path"?
>
> Do you mean what POSIX calls "absolute pathname"?
Yes.
> > diff --git a/qemu-options.hx b/qemu-options.hx
> > index 2f6863180b0..2f63d86b635 100644
> > --- a/qemu-options.hx
> > +++ b/qemu-options.hx
> > @@ -6682,6 +6682,20 @@ SRST
> > ::
> >
> > (qemu) qom-set /objects/iothread1 poll-max-ns 100000
> > +
> > +
> > + ``-object tldr-config,id=id,crash-target=path``
> > + Creating the ``tldr-config`` object enables the thrifty live data
> > + recorder, which continuously captures important information about
> > + the operation of the QEMU process. When a SIGSEGV, SIGBUS,
> > + SIGILL, SIGFPE or SIGABRT are seen the contents of the data
> > + recorder will be dumped to the stderr stream. If the
> > + ``crash-target`` parameter was given, that specifies a fully
> > + qualified file path to write the dump to instead of stderr.
> > +
> > + The ``tldr-config`` object can be added at initial startup
> > + or via QMP at runtime. Once created, however, it is not
> > + permitted to disable it.
>
> Call the object "tldr"?
Yes, that's an option.
> > diff --git a/util/tldr-internal.h b/util/tldr-internal.h
> > new file mode 100644
> > index 00000000000..193d8425eee
> > --- /dev/null
> > +++ b/util/tldr-internal.h
> > @@ -0,0 +1,21 @@
> > +/*
> > + * SPDX-License-Identifier: GPL-2.0-or-later
> > + *
> > + * TL;DR: Thrifty Live Data Recorder
> > + *
> > + * Copyright (C) 2026 Red Hat Inc.
> > + */
> > +
> > +#ifndef QEMU_TLDR_INTERNAL_H__
> > +#define QEMU_TLDR_INTERNAL_H__
> > +
> > +#include "qemu/tldr.h"
> > +
> > +#define QTLDR_DUMP_LEADER "\n🚨🚨🚨 QEMU Data Recorder Start 🚨🚨🚨\n"
> > +#define QTLDR_DUMP_TRAILER "\n🚨🚨🚨 QEMU Data Recorder End 🚨🚨🚨\n\n"
> > +#define QTLDR_DUMP_TRIGGER_PREFIX "\n🔍 Trigger:"
> > +#define QTLDR_DUMP_OPEN_ERROR "🔥 Unable to dump to '"
>
> The emojis make the dump file UTF-8. Fine, I guess?
Personally I consider UTF-8 to be acceptable/expected to work for
any OS platform since the mid 2000s, certainly for platforms that
QEMU targets.
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|