[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH v4 8/9] ppc/pnv: extend the machine with a InterruptSt
From: |
Cédric Le Goater |
Subject: |
[Qemu-ppc] [PATCH v4 8/9] ppc/pnv: extend the machine with a InterruptStatsProvider interface |
Date: |
Wed, 29 Mar 2017 15:53:30 +0200 |
Signed-off-by: Cédric Le Goater <address@hidden>
---
hw/ppc/pnv.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index 57560b09e04e..15a908f4306a 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -33,6 +33,8 @@
#include "exec/address-spaces.h"
#include "qemu/cutils.h"
#include "qapi/visitor.h"
+#include "monitor/monitor.h"
+#include "hw/intc/intc.h"
#include "hw/ppc/xics.h"
#include "hw/ppc/pnv_xscom.h"
@@ -773,6 +775,18 @@ static ICPState *pnv_icp_get(XICSFabric *xi, int pir)
return cpu ? ICP(cpu->intc) : NULL;
}
+static void pnv_pic_print_info(InterruptStatsProvider *obj,
+ Monitor *mon)
+{
+ CPUState *cs;
+
+ CPU_FOREACH(cs) {
+ PowerPCCPU *cpu = POWERPC_CPU(cs);
+
+ icp_pic_print_info(ICP(cpu->intc), mon);
+ }
+}
+
static void pnv_get_num_chips(Object *obj, Visitor *v, const char *name,
void *opaque, Error **errp)
{
@@ -824,6 +838,7 @@ static void powernv_machine_class_init(ObjectClass *oc,
void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);
XICSFabricClass *xic = XICS_FABRIC_CLASS(oc);
+ InterruptStatsProviderClass *ispc = INTERRUPT_STATS_PROVIDER_CLASS(oc);
mc->desc = "IBM PowerNV (Non-Virtualized)";
mc->init = ppc_powernv_init;
@@ -837,6 +852,7 @@ static void powernv_machine_class_init(ObjectClass *oc,
void *data)
xic->icp_get = pnv_icp_get;
xic->ics_get = pnv_ics_get;
xic->ics_resend = pnv_ics_resend;
+ ispc->print_info = pnv_pic_print_info;
powernv_machine_class_props_init(oc);
}
@@ -849,6 +865,7 @@ static const TypeInfo powernv_machine_info = {
.class_init = powernv_machine_class_init,
.interfaces = (InterfaceInfo[]) {
{ TYPE_XICS_FABRIC },
+ { TYPE_INTERRUPT_STATS_PROVIDER },
{ },
},
};
--
2.7.4
- Re: [Qemu-ppc] [PATCH v4 2/9] spapr: move the IRQ server number mapping under the machine, (continued)
[Qemu-ppc] [PATCH v4 2+/9] spapr: allocate the ICPState object from under sPAPRCPUCore, Cédric Le Goater, 2017/03/30
[Qemu-ppc] [PATCH v4 3/9] ppc/xics: add a realize() handler to ICPStateClass, Cédric Le Goater, 2017/03/29
[Qemu-ppc] [PATCH v4 4/9] ppc/pnv: add a PnvICPState object, Cédric Le Goater, 2017/03/29
[Qemu-ppc] [PATCH v4 5/9] ppc/pnv: create the ICP object under PnvCore, Cédric Le Goater, 2017/03/29
[Qemu-ppc] [PATCH v4 6/9] ppc/pnv: add a helper to calculate MMIO addresses registers, Cédric Le Goater, 2017/03/29
[Qemu-ppc] [PATCH v4 7/9] ppc/pnv: extend the machine with a XICSFabric interface, Cédric Le Goater, 2017/03/29
[Qemu-ppc] [PATCH v4 8/9] ppc/pnv: extend the machine with a InterruptStatsProvider interface,
Cédric Le Goater <=
[Qemu-ppc] [PATCH v4 9/9] ppc/pnv: add memory regions for the ICP registers, Cédric Le Goater, 2017/03/29