aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/xive.c31
1 files changed, 27 insertions, 4 deletions
diff --git a/hw/xive.c b/hw/xive.c
index 5ec981d..fc606fd 100644
--- a/hw/xive.c
+++ b/hw/xive.c
@@ -300,6 +300,7 @@ struct xive_cpu_state {
uint32_t eqmsk;
uint8_t eqgen;
void *eqmmio;
+ uint64_t total_irqs;
};
#ifdef XIVE_PERCPU_LOG
@@ -3186,6 +3187,7 @@ static uint32_t xive_read_eq(struct xive_cpu_state *xs, bool just_peek)
xs->eqptr = (xs->eqptr + 1) & xs->eqmsk;
if (xs->eqptr == 0)
xs->eqgen ^= 1;
+ xs->total_irqs++;
}
return cur & 0x00ffffff;
}
@@ -4448,6 +4450,9 @@ static int64_t opal_xive_dump_emu(uint32_t pir)
{
struct cpu_thread *c = find_cpu_by_pir(pir);
struct xive_cpu_state *xs;
+ struct xive_eq *eq;
+ uint32_t ipi_target = -1u;
+ uint8_t *mm, pq;
if (!c)
return OPAL_PARAMETER;
@@ -4462,13 +4467,31 @@ static int64_t opal_xive_dump_emu(uint32_t pir)
lock(&xs->lock);
prlog(PR_INFO, "CPU[%04x]: cppr=%02x mfrr=%02x pend=%02x"
- " prev_cppr=%02x\n", pir,
- xs->cppr, xs->mfrr, xs->pending, xs->prev_cppr);
+ " prev_cppr=%02x total_irqs=%llx\n", pir,
+ xs->cppr, xs->mfrr, xs->pending, xs->prev_cppr, xs->total_irqs);
- prlog(PR_INFO, "CPU[%04x]: EQ IDX=%x MSK=%x G=%d [%08x %08x ...]\n",
+ prlog(PR_INFO, "CPU[%04x]: EQ IDX=%x MSK=%x G=%d [%08x %08x %08x > %08x %08x %08x %08x ...]\n",
pir, xs->eqptr, xs->eqmsk, xs->eqgen,
+ xs->eqbuf[(xs->eqptr - 3) & xs->eqmsk],
+ xs->eqbuf[(xs->eqptr - 2) & xs->eqmsk],
+ xs->eqbuf[(xs->eqptr - 1) & xs->eqmsk],
xs->eqbuf[(xs->eqptr + 0) & xs->eqmsk],
- xs->eqbuf[(xs->eqptr + 1) & xs->eqmsk]);
+ xs->eqbuf[(xs->eqptr + 1) & xs->eqmsk],
+ xs->eqbuf[(xs->eqptr + 2) & xs->eqmsk],
+ xs->eqbuf[(xs->eqptr + 3) & xs->eqmsk]);
+
+ mm = xs->xive->esb_mmio + GIRQ_TO_IDX(xs->ipi_irq) * 0x20000;
+ pq = in_8(mm + 0x10800);
+ xive_get_irq_targetting(xs->ipi_irq, &ipi_target, NULL, NULL);
+ prlog(PR_INFO, "CPU[%04x]: IPI #%08x PQ=%x target=%08x\n",
+ pir, xs->ipi_irq, pq, ipi_target);
+
+ __xive_cache_scrub(xs->xive, xive_cache_eqc, xs->eq_blk,
+ xs->eq_idx + XIVE_EMULATION_PRIO,
+ false, false);
+ eq = xive_get_eq(xs->xive, xs->eq_idx + XIVE_EMULATION_PRIO);
+ prlog(PR_INFO, "CPU[%04x]: EQ @%p W0=%08x W1=%08x qbuf @%p\n",
+ pir, eq, eq->w0, eq->w1, xs->eqbuf);
log_print(xs);