aboutsummaryrefslogtreecommitdiff
path: root/monitor
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2024-06-07 16:37:24 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2024-06-19 12:40:49 +0200
commit795eaa62fa68c452b926fbfc4ccdcb4cd1552531 (patch)
treeaf194684c581e81714d591bd1956125d9a459a6e /monitor
parentb2580720d026fa1591218468891a47f42be6a335 (diff)
downloadqemu-795eaa62fa68c452b926fbfc4ccdcb4cd1552531.zip
qemu-795eaa62fa68c452b926fbfc4ccdcb4cd1552531.tar.gz
qemu-795eaa62fa68c452b926fbfc4ccdcb4cd1552531.tar.bz2
hw/intc: Introduce x-query-interrupt-controllers QMP command
This is a counterpart to the HMP "info pic" command. It is being added with an "x-" prefix because this QMP command is intended as an adhoc debugging tool and will thus not be modelled in QAPI as fully structured data, nor will it have long term guaranteed stability. The existing HMP command is rewritten to call the QMP command. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20240610063518.50680-3-philmd@linaro.org>
Diffstat (limited to 'monitor')
-rw-r--r--monitor/hmp-cmds.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
index fbff7fd..45ee3a9 100644
--- a/monitor/hmp-cmds.c
+++ b/monitor/hmp-cmds.c
@@ -25,9 +25,7 @@
#include "qapi/qapi-commands-machine.h"
#include "qapi/qapi-commands-misc.h"
#include "qapi/qmp/qdict.h"
-#include "qapi/type-helpers.h"
#include "qemu/cutils.h"
-#include "hw/intc/intc.h"
#include "qemu/log.h"
#include "sysemu/sysemu.h"
@@ -83,37 +81,6 @@ void hmp_info_version(Monitor *mon, const QDict *qdict)
qapi_free_VersionInfo(info);
}
-static int hmp_info_pic_foreach(Object *obj, void *opaque)
-{
- InterruptStatsProvider *intc;
- InterruptStatsProviderClass *k;
- Monitor *mon = opaque;
-
- if (object_dynamic_cast(obj, TYPE_INTERRUPT_STATS_PROVIDER)) {
- intc = INTERRUPT_STATS_PROVIDER(obj);
- k = INTERRUPT_STATS_PROVIDER_GET_CLASS(obj);
- if (k->print_info) {
- g_autoptr(GString) buf = g_string_new("");
- g_autoptr(HumanReadableText) info = NULL;
-
- k->print_info(intc, buf);
- info = human_readable_text_from_str(buf);
- monitor_puts(mon, info->human_readable_text);
- } else {
- monitor_printf(mon, "Interrupt controller information not available for %s.\n",
- object_get_typename(obj));
- }
- }
-
- return 0;
-}
-
-void hmp_info_pic(Monitor *mon, const QDict *qdict)
-{
- object_child_foreach_recursive(object_get_root(),
- hmp_info_pic_foreach, mon);
-}
-
void hmp_quit(Monitor *mon, const QDict *qdict)
{
monitor_suspend(mon);