diff options
author | Cédric Le Goater <clg@kaod.org> | 2020-11-23 17:37:17 +0100 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2020-12-14 15:54:12 +1100 |
commit | 4e960974d4ee66bc03ed6ef4b1b1eb6234039417 (patch) | |
tree | 076af6fcc2d19022c82ed351486b97e8be3f67f9 /hw/intc/spapr_xive.c | |
parent | 728aa6f6ffd8cf21d9485eff7ac1926b00155ed2 (diff) |
xive: Add trace events
I have been keeping those logging messages in an ugly form for
while. Make them clean !
Beware not to activate all of them, this is really verbose.
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20201123163717.1368450-1-clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/intc/spapr_xive.c')
-rw-r--r-- | hw/intc/spapr_xive.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/hw/intc/spapr_xive.c b/hw/intc/spapr_xive.c index 60e0d5769d..caedd312d7 100644 --- a/hw/intc/spapr_xive.c +++ b/hw/intc/spapr_xive.c @@ -24,6 +24,7 @@ #include "hw/ppc/xive.h" #include "hw/ppc/xive_regs.h" #include "hw/qdev-properties.h" +#include "trace.h" /* * XIVE Virtualization Controller BAR and Thread Managment BAR that we @@ -556,6 +557,8 @@ static int spapr_xive_claim_irq(SpaprInterruptController *intc, int lisn, assert(lisn < xive->nr_irqs); + trace_spapr_xive_claim_irq(lisn, lsi); + if (xive_eas_is_valid(&xive->eat[lisn])) { error_setg(errp, "IRQ %d is not free", lisn); return -EBUSY; @@ -581,6 +584,8 @@ static void spapr_xive_free_irq(SpaprInterruptController *intc, int lisn) SpaprXive *xive = SPAPR_XIVE(intc); assert(lisn < xive->nr_irqs); + trace_spapr_xive_free_irq(lisn); + xive->eat[lisn].w &= cpu_to_be64(~EAS_VALID); } @@ -647,6 +652,8 @@ static void spapr_xive_set_irq(SpaprInterruptController *intc, int irq, int val) { SpaprXive *xive = SPAPR_XIVE(intc); + trace_spapr_xive_set_irq(irq, val); + if (spapr_xive_in_kernel(xive)) { kvmppc_xive_source_set_irq(&xive->source, irq, val); } else { @@ -894,6 +901,8 @@ static target_ulong h_int_get_source_info(PowerPCCPU *cpu, target_ulong flags = args[0]; target_ulong lisn = args[1]; + trace_spapr_xive_get_source_info(flags, lisn); + if (!spapr_ovec_test(spapr->ov5_cas, OV5_XIVE_EXPLOIT)) { return H_FUNCTION; } @@ -1009,6 +1018,8 @@ static target_ulong h_int_set_source_config(PowerPCCPU *cpu, uint8_t end_blk; uint32_t end_idx; + trace_spapr_xive_set_source_config(flags, lisn, target, priority, eisn); + if (!spapr_ovec_test(spapr->ov5_cas, OV5_XIVE_EXPLOIT)) { return H_FUNCTION; } @@ -1114,6 +1125,8 @@ static target_ulong h_int_get_source_config(PowerPCCPU *cpu, uint8_t nvt_blk; uint32_t end_idx, nvt_idx; + trace_spapr_xive_get_source_config(flags, lisn); + if (!spapr_ovec_test(spapr->ov5_cas, OV5_XIVE_EXPLOIT)) { return H_FUNCTION; } @@ -1188,6 +1201,8 @@ static target_ulong h_int_get_queue_info(PowerPCCPU *cpu, uint8_t end_blk; uint32_t end_idx; + trace_spapr_xive_get_queue_info(flags, target, priority); + if (!spapr_ovec_test(spapr->ov5_cas, OV5_XIVE_EXPLOIT)) { return H_FUNCTION; } @@ -1275,6 +1290,8 @@ static target_ulong h_int_set_queue_config(PowerPCCPU *cpu, uint8_t end_blk, nvt_blk; uint32_t end_idx, nvt_idx; + trace_spapr_xive_set_queue_config(flags, target, priority, qpage, qsize); + if (!spapr_ovec_test(spapr->ov5_cas, OV5_XIVE_EXPLOIT)) { return H_FUNCTION; } @@ -1442,6 +1459,8 @@ static target_ulong h_int_get_queue_config(PowerPCCPU *cpu, uint8_t end_blk; uint32_t end_idx; + trace_spapr_xive_get_queue_config(flags, target, priority); + if (!spapr_ovec_test(spapr->ov5_cas, OV5_XIVE_EXPLOIT)) { return H_FUNCTION; } @@ -1535,6 +1554,10 @@ static target_ulong h_int_set_os_reporting_line(PowerPCCPU *cpu, target_ulong opcode, target_ulong *args) { + target_ulong flags = args[0]; + + trace_spapr_xive_set_os_reporting_line(flags); + if (!spapr_ovec_test(spapr->ov5_cas, OV5_XIVE_EXPLOIT)) { return H_FUNCTION; } @@ -1571,6 +1594,10 @@ static target_ulong h_int_get_os_reporting_line(PowerPCCPU *cpu, target_ulong opcode, target_ulong *args) { + target_ulong flags = args[0]; + + trace_spapr_xive_get_os_reporting_line(flags); + if (!spapr_ovec_test(spapr->ov5_cas, OV5_XIVE_EXPLOIT)) { return H_FUNCTION; } @@ -1623,6 +1650,8 @@ static target_ulong h_int_esb(PowerPCCPU *cpu, hwaddr mmio_addr; XiveSource *xsrc = &xive->source; + trace_spapr_xive_esb(flags, lisn, offset, data); + if (!spapr_ovec_test(spapr->ov5_cas, OV5_XIVE_EXPLOIT)) { return H_FUNCTION; } @@ -1692,6 +1721,8 @@ static target_ulong h_int_sync(PowerPCCPU *cpu, target_ulong flags = args[0]; target_ulong lisn = args[1]; + trace_spapr_xive_sync(flags, lisn); + if (!spapr_ovec_test(spapr->ov5_cas, OV5_XIVE_EXPLOIT)) { return H_FUNCTION; } @@ -1757,6 +1788,8 @@ static target_ulong h_int_reset(PowerPCCPU *cpu, SpaprXive *xive = spapr->xive; target_ulong flags = args[0]; + trace_spapr_xive_reset(flags); + if (!spapr_ovec_test(spapr->ov5_cas, OV5_XIVE_EXPLOIT)) { return H_FUNCTION; } |