qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Examining device state via monitor for debugging (was: [PATCH 0/2] hw/mi


From: Markus Armbruster
Subject: Examining device state via monitor for debugging (was: [PATCH 0/2] hw/misc/mos6522: Do not open-code hmp_info_human_readable_text())
Date: Tue, 11 Jun 2024 07:49:12 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Philippe Mathieu-Daudé <philmd@linaro.org> writes:

> Officialise the QMP command, use the existing
> hmp_info_human_readable_text() helper.

I'm not sure "officialise" is a word :)

Taking a step back...  "info via" and its new QMP counterpart
x-query-mos6522-devices dump device state.  I understand why examining
device state via monitor can be useful for debugging.  However, we have
more than 2000 devices in the tree.  Clearly, we don't want 2000 device
state queries.  Not even 100.  Could we have more generic means instead?

We could use QOM (read-only) properties to expose device state.

If we use one QOM property per "thing", examining device state becomes
quite tedious.  Also, you'd have to stop the guest to get a consistent
view, and adding lots of QOM properties bloats the code.

If we use a single, object-valued property for the entire state, we get
to define the objects in QAPI.  Differently tedious, and bloats the
generated code.

We could use a single string-valued property.  Too much of an abuse of
QOM?

We could add an optional "dump state for debugging" method to QOM, and
have a single query command that calls it if present.

Thoughts?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]