diff options
author | Cédric Le Goater <clg@kaod.org> | 2017-04-03 09:46:02 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2017-04-26 12:00:42 +1000 |
commit | 47fea43aa3414fcbab270d84de307cce5657166c (patch) | |
tree | 373f4f664b7dfc1d0276cab166f8ce4b036a797f /hw/ppc/pnv.c | |
parent | 36fc6f080056c3779abc195a40cae76bef0f66f1 (diff) |
ppc/pnv: extend the machine with a InterruptStatsProvider interface
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc/pnv.c')
-rw-r--r-- | hw/ppc/pnv.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index 0a0cfe3275..f3623ee6f3 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" @@ -762,6 +764,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) { @@ -813,6 +827,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; @@ -824,6 +839,7 @@ static void powernv_machine_class_init(ObjectClass *oc, void *data) mc->default_boot_order = NULL; mc->default_ram_size = 1 * G_BYTE; xic->icp_get = pnv_icp_get; + ispc->print_info = pnv_pic_print_info; powernv_machine_class_props_init(oc); } @@ -836,6 +852,7 @@ static const TypeInfo powernv_machine_info = { .class_init = powernv_machine_class_init, .interfaces = (InterfaceInfo[]) { { TYPE_XICS_FABRIC }, + { TYPE_INTERRUPT_STATS_PROVIDER }, { }, }, }; |