[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [RFC PATCH 12/26] ppc/xive: add a print_info() handler for th
From: |
Cédric Le Goater |
Subject: |
[Qemu-ppc] [RFC PATCH 12/26] ppc/xive: add a print_info() handler for the interrupt source |
Date: |
Wed, 5 Jul 2017 19:13:25 +0200 |
This is much like the default one but we expose the PQ bits also.
Signed-off-by: Cédric Le Goater <address@hidden>
---
hw/intc/xive.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/hw/intc/xive.c b/hw/intc/xive.c
index 0db97fd33981..db808e0cbe3d 100644
--- a/hw/intc/xive.c
+++ b/hw/intc/xive.c
@@ -290,6 +290,25 @@ static void xive_ics_set_irq(void *opaque, int srcno, int
val)
}
}
+static void xive_ics_print_info(ICSState *ics, Monitor *mon)
+{
+ XiveICSState *xs = ICS_XIVE(ics);
+ int i;
+
+ for (i = 0; i < ics->nr_irqs; i++) {
+ ICSIRQState *irq = ics->irqs + i;
+
+ if (!(irq->flags & XICS_FLAGS_IRQ_MASK)) {
+ continue;
+ }
+ monitor_printf(mon, " %4x %s pq=%02x status=%02x\n",
+ ics->offset + i,
+ (irq->flags & XICS_FLAGS_IRQ_LSI) ? "LSI" : "MSI",
+ xive_pq_get(xs->xive, ics->offset + i),
+ irq->status);
+ }
+}
+
static void xive_ics_reset(void *dev)
{
ICSState *ics = ICS_BASE(dev);
@@ -364,6 +383,7 @@ static void xive_ics_class_init(ObjectClass *klass, void
*data)
ICSStateClass *isc = ICS_BASE_CLASS(klass);
isc->realize = xive_ics_realize;
+ isc->print_info = xive_ics_print_info;
dc->props = xive_ics_properties;
}
--
2.7.5
- Re: [Qemu-ppc] [RFC PATCH 09/26] ppc/xive: add an overall memory region for the ESBs, (continued)
[Qemu-ppc] [RFC PATCH 10/26] ppc/xive: record interrupt source MMIO address for hcalls, Cédric Le Goater, 2017/07/05
[Qemu-ppc] [RFC PATCH 11/26] ppc/xics: introduce a print_info() handler to the ICS and ICP objects, Cédric Le Goater, 2017/07/05
[Qemu-ppc] [RFC PATCH 12/26] ppc/xive: add a print_info() handler for the interrupt source,
Cédric Le Goater <=
[Qemu-ppc] [RFC PATCH 13/26] ppc/xive: introduce a XIVE interrupt presenter model, Cédric Le Goater, 2017/07/05
[Qemu-ppc] [RFC PATCH 14/26] ppc/xive: add MMIO handlers to the XIVE interrupt presenter model, Cédric Le Goater, 2017/07/05
- Re: [Qemu-ppc] [RFC PATCH 14/26] ppc/xive: add MMIO handlers to the XIVE interrupt presenter model, David Gibson, 2017/07/24
- Re: [Qemu-ppc] [RFC PATCH 14/26] ppc/xive: add MMIO handlers to the XIVE interrupt presenter model, Cédric Le Goater, 2017/07/24
- Re: [Qemu-ppc] [RFC PATCH 14/26] ppc/xive: add MMIO handlers to the XIVE interrupt presenter model, David Gibson, 2017/07/25
- Re: [Qemu-ppc] [RFC PATCH 14/26] ppc/xive: add MMIO handlers to the XIVE interrupt presenter model, Cédric Le Goater, 2017/07/25
- Re: [Qemu-ppc] [RFC PATCH 14/26] ppc/xive: add MMIO handlers to the XIVE interrupt presenter model, David Gibson, 2017/07/25
- Re: [Qemu-ppc] [RFC PATCH 14/26] ppc/xive: add MMIO handlers to the XIVE interrupt presenter model, Cédric Le Goater, 2017/07/25