hw/intc: Avoid using Monitor in INTERRUPT_STATS_PROVIDER::print_info()

Replace Monitor API by HumanReadableText one (see commit f2de406f29
"docs/devel: document expectations for QAPI data modelling for QMP"
for rationale).

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20240610063518.50680-2-philmd@linaro.org>
This commit is contained in:
Philippe Mathieu-Daudé 2024-06-07 12:47:04 +02:00
parent a58e653aa2
commit b2580720d0
9 changed files with 57 additions and 68 deletions

View file

@ -38,8 +38,6 @@
#include "hw/loader.h"
#include "hw/nmi.h"
#include "qapi/visitor.h"
#include "qapi/type-helpers.h"
#include "monitor/monitor.h"
#include "hw/intc/intc.h"
#include "hw/ipmi/ipmi.h"
#include "target/ppc/mmu-hash64.h"
@ -2331,14 +2329,11 @@ static ICPState *pnv_icp_get(XICSFabric *xi, int pir)
return cpu ? ICP(pnv_cpu_state(cpu)->intc) : NULL;
}
static void pnv_pic_print_info(InterruptStatsProvider *obj,
Monitor *mon)
static void pnv_pic_print_info(InterruptStatsProvider *obj, GString *buf)
{
PnvMachineState *pnv = PNV_MACHINE(obj);
int i;
CPUState *cs;
g_autoptr(GString) buf = g_string_new("");
g_autoptr(HumanReadableText) info = NULL;
CPU_FOREACH(cs) {
PowerPCCPU *cpu = POWERPC_CPU(cs);
@ -2351,9 +2346,6 @@ static void pnv_pic_print_info(InterruptStatsProvider *obj,
for (i = 0; i < pnv->num_chips; i++) {
PNV_CHIP_GET_CLASS(pnv->chips[i])->pic_print_info(pnv->chips[i], buf);
}
info = human_readable_text_from_str(buf);
monitor_puts(mon, info->human_readable_text);
}
static int pnv_match_nvt(XiveFabric *xfb, uint8_t format,