diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2018-01-11 21:37:11 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@ozlabs.org> | 2018-01-18 20:10:21 -0500 |
commit | c424c108233dc422a9a29ee833154006a5bdf9fc (patch) | |
tree | 2e9525703308e93210f44a2f75d7383e6d6ac07b | |
parent | d27998185da8fbdc35911307ae13518d168778d7 (diff) |
KVM: PPC: Book3S HV: Add more info about XIVE queues in debugfs
Add details about enabled queues and escalation interrupts.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
-rw-r--r-- | arch/powerpc/kvm/book3s_xive.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s_xive.c b/arch/powerpc/kvm/book3s_xive.c index bf457843e032..6cff5bdfd6b7 100644 --- a/arch/powerpc/kvm/book3s_xive.c +++ b/arch/powerpc/kvm/book3s_xive.c | |||
@@ -1794,6 +1794,7 @@ static int xive_debug_show(struct seq_file *m, void *private) | |||
1794 | 1794 | ||
1795 | kvm_for_each_vcpu(i, vcpu, kvm) { | 1795 | kvm_for_each_vcpu(i, vcpu, kvm) { |
1796 | struct kvmppc_xive_vcpu *xc = vcpu->arch.xive_vcpu; | 1796 | struct kvmppc_xive_vcpu *xc = vcpu->arch.xive_vcpu; |
1797 | unsigned int i; | ||
1797 | 1798 | ||
1798 | if (!xc) | 1799 | if (!xc) |
1799 | continue; | 1800 | continue; |
@@ -1803,6 +1804,33 @@ static int xive_debug_show(struct seq_file *m, void *private) | |||
1803 | xc->server_num, xc->cppr, xc->hw_cppr, | 1804 | xc->server_num, xc->cppr, xc->hw_cppr, |
1804 | xc->mfrr, xc->pending, | 1805 | xc->mfrr, xc->pending, |
1805 | xc->stat_rm_h_xirr, xc->stat_vm_h_xirr); | 1806 | xc->stat_rm_h_xirr, xc->stat_vm_h_xirr); |
1807 | for (i = 0; i < KVMPPC_XIVE_Q_COUNT; i++) { | ||
1808 | struct xive_q *q = &xc->queues[i]; | ||
1809 | u32 i0, i1, idx; | ||
1810 | |||
1811 | if (!q->qpage && !xc->esc_virq[i]) | ||
1812 | continue; | ||
1813 | |||
1814 | seq_printf(m, " [q%d]: ", i); | ||
1815 | |||
1816 | if (q->qpage) { | ||
1817 | idx = q->idx; | ||
1818 | i0 = be32_to_cpup(q->qpage + idx); | ||
1819 | idx = (idx + 1) & q->msk; | ||
1820 | i1 = be32_to_cpup(q->qpage + idx); | ||
1821 | seq_printf(m, "T=%d %08x %08x... \n", q->toggle, i0, i1); | ||
1822 | } | ||
1823 | if (xc->esc_virq[i]) { | ||
1824 | struct irq_data *d = irq_get_irq_data(xc->esc_virq[i]); | ||
1825 | struct xive_irq_data *xd = irq_data_get_irq_handler_data(d); | ||
1826 | u64 pq = xive_vm_esb_load(xd, XIVE_ESB_GET); | ||
1827 | seq_printf(m, "E:%c%c I(%d:%llx:%llx)", | ||
1828 | (pq & XIVE_ESB_VAL_P) ? 'P' : 'p', | ||
1829 | (pq & XIVE_ESB_VAL_Q) ? 'Q' : 'q', | ||
1830 | xc->esc_virq[i], pq, xd->eoi_page); | ||
1831 | seq_printf(m, "\n"); | ||
1832 | } | ||
1833 | } | ||
1806 | 1834 | ||
1807 | t_rm_h_xirr += xc->stat_rm_h_xirr; | 1835 | t_rm_h_xirr += xc->stat_rm_h_xirr; |
1808 | t_rm_h_ipoll += xc->stat_rm_h_ipoll; | 1836 | t_rm_h_ipoll += xc->stat_rm_h_ipoll; |