aboutsummaryrefslogtreecommitdiff
path: root/hw/pci-host
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2024-06-07 13:21:53 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2024-06-19 12:40:49 +0200
commitdafec001d6ce8ca7f8a1061acd1e4995881d8efb (patch)
treef4c251a63f0db300423326a16d54a309b20bf97d /hw/pci-host
parenta276ec8e2632c9015d0f9b4e47194e4e91dfa8bb (diff)
downloadqemu-dafec001d6ce8ca7f8a1061acd1e4995881d8efb.zip
qemu-dafec001d6ce8ca7f8a1061acd1e4995881d8efb.tar.gz
qemu-dafec001d6ce8ca7f8a1061acd1e4995881d8efb.tar.bz2
hw/ppc: Avoid using Monitor in pnv_phb3_msi_pic_print_info()
Replace Monitor API by HumanReadableText one. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Reviewed-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com> Message-Id: <20240610062105.49848-2-philmd@linaro.org>
Diffstat (limited to 'hw/pci-host')
-rw-r--r--hw/pci-host/pnv_phb3_msi.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/hw/pci-host/pnv_phb3_msi.c b/hw/pci-host/pnv_phb3_msi.c
index a6d827f..77d673d 100644
--- a/hw/pci-host/pnv_phb3_msi.c
+++ b/hw/pci-host/pnv_phb3_msi.c
@@ -13,7 +13,6 @@
#include "hw/pci-host/pnv_phb3.h"
#include "hw/ppc/pnv.h"
#include "hw/pci/msi.h"
-#include "monitor/monitor.h"
#include "hw/irq.h"
#include "hw/qdev-properties.h"
#include "sysemu/reset.h"
@@ -316,13 +315,13 @@ static void pnv_phb3_msi_register_types(void)
type_init(pnv_phb3_msi_register_types);
-void pnv_phb3_msi_pic_print_info(Phb3MsiState *msi, Monitor *mon)
+void pnv_phb3_msi_pic_print_info(Phb3MsiState *msi, GString *buf)
{
ICSState *ics = ICS(msi);
int i;
- monitor_printf(mon, "ICS %4x..%4x %p\n",
- ics->offset, ics->offset + ics->nr_irqs - 1, ics);
+ g_string_append_printf(buf, "ICS %4x..%4x %p\n",
+ ics->offset, ics->offset + ics->nr_irqs - 1, ics);
for (i = 0; i < ics->nr_irqs; i++) {
uint64_t ive;
@@ -335,12 +334,12 @@ void pnv_phb3_msi_pic_print_info(Phb3MsiState *msi, Monitor *mon)
continue;
}
- monitor_printf(mon, " %4x %c%c server=%04x prio=%02x gen=%d\n",
- ics->offset + i,
- GETFIELD(IODA2_IVT_P, ive) ? 'P' : '-',
- GETFIELD(IODA2_IVT_Q, ive) ? 'Q' : '-',
- (uint32_t) GETFIELD(IODA2_IVT_SERVER, ive) >> 2,
- (uint32_t) GETFIELD(IODA2_IVT_PRIORITY, ive),
- (uint32_t) GETFIELD(IODA2_IVT_GEN, ive));
+ g_string_append_printf(buf, " %4x %c%c server=%04x prio=%02x gen=%d\n",
+ ics->offset + i,
+ GETFIELD(IODA2_IVT_P, ive) ? 'P' : '-',
+ GETFIELD(IODA2_IVT_Q, ive) ? 'Q' : '-',
+ (uint32_t) GETFIELD(IODA2_IVT_SERVER, ive) >> 2,
+ (uint32_t) GETFIELD(IODA2_IVT_PRIORITY, ive),
+ (uint32_t) GETFIELD(IODA2_IVT_GEN, ive));
}
}