[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH v4 18/25] ppc/pnv: Skip empty slots of the XIVE NVT ta
From: |
Cédric Le Goater |
Subject: |
[Qemu-ppc] [PATCH v4 18/25] ppc/pnv: Skip empty slots of the XIVE NVT table |
Date: |
Wed, 18 Sep 2019 18:06:38 +0200 |
We try to loop on the full table skipping empty indirect pages which
are not necessarily allocated. This is useful to dump the contexts of
the KVM vCPUs.
Signed-off-by: Cédric Le Goater <address@hidden>
---
hw/intc/pnv_xive.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/hw/intc/pnv_xive.c b/hw/intc/pnv_xive.c
index 782775136288..a986d4ed9364 100644
--- a/hw/intc/pnv_xive.c
+++ b/hw/intc/pnv_xive.c
@@ -1641,6 +1641,12 @@ static const MemoryRegionOps pnv_xive_pc_ops = {
},
};
+/*
+ * skiboot uses an indirect NVT table with 64k subpages
+ */
+#define XIVE_NVT_COUNT (1 << XIVE_NVT_SHIFT)
+#define XIVE_NVT_PER_PAGE (0x10000 / sizeof(XiveNVT))
+
static void xive_nvt_pic_print_info(XiveNVT *nvt, uint32_t nvt_idx,
Monitor *mon)
{
@@ -1694,10 +1700,12 @@ void pnv_xive_pic_print_info(PnvXive *xive, Monitor
*mon)
xive_end_eas_pic_print_info(&end, i++, mon);
}
- monitor_printf(mon, "XIVE[%x] NVTT\n", blk);
- i = 0;
- while (!xive_router_get_nvt(xrtr, blk, i, &nvt)) {
- xive_nvt_pic_print_info(&nvt, i++, mon);
+ monitor_printf(mon, "XIVE[%x] NVTT %08x .. %08x\n", blk, 0,
+ XIVE_NVT_COUNT - 1);
+ for (i = 0; i < XIVE_NVT_COUNT; i += XIVE_NVT_PER_PAGE) {
+ while (!xive_router_get_nvt(xrtr, blk, i, &nvt)) {
+ xive_nvt_pic_print_info(&nvt, i++, mon);
+ }
}
}
--
2.21.0
- [Qemu-ppc] [PATCH v4 08/25] ppc/xive: Use the XiveFabric and XivePresenter interfaces, (continued)
- [Qemu-ppc] [PATCH v4 08/25] ppc/xive: Use the XiveFabric and XivePresenter interfaces, Cédric Le Goater, 2019/09/18
- [Qemu-ppc] [PATCH v4 09/25] ppc/xive: Extend the TIMA operation with a XivePresenter parameter, Cédric Le Goater, 2019/09/18
- [Qemu-ppc] [PATCH v4 10/25] ppc/pnv: Clarify how the TIMA is accessed on a multichip system, Cédric Le Goater, 2019/09/18
- [Qemu-ppc] [PATCH v4 11/25] ppc/xive: Move the TIMA operations to the controller model, Cédric Le Goater, 2019/09/18
- [Qemu-ppc] [PATCH v4 12/25] ppc/xive: Remove the get_tctx() XiveRouter handler, Cédric Le Goater, 2019/09/18
- [Qemu-ppc] [PATCH v4 13/25] ppc/xive: Introduce a xive_tctx_ipb_update() helper, Cédric Le Goater, 2019/09/18
- [Qemu-ppc] [PATCH v4 14/25] ppc/xive: Introduce helpers for the NVT id, Cédric Le Goater, 2019/09/18
- [Qemu-ppc] [PATCH v4 15/25] ppc/xive: Synthesize interrupt from the saved IPB in the NVT, Cédric Le Goater, 2019/09/18
- [Qemu-ppc] [PATCH v4 16/25] ppc/pnv: Remove pnv_xive_vst_size() routine, Cédric Le Goater, 2019/09/18
- [Qemu-ppc] [PATCH v4 17/25] ppc/pnv: Dump the XIVE NVT table, Cédric Le Goater, 2019/09/18
- [Qemu-ppc] [PATCH v4 18/25] ppc/pnv: Skip empty slots of the XIVE NVT table,
Cédric Le Goater <=
- [Qemu-ppc] [PATCH v4 19/25] ppc/pnv: Introduce a pnv_xive_block_id() helper, Cédric Le Goater, 2019/09/18
- [Qemu-ppc] [PATCH v4 20/25] ppc/pnv: Extend XiveRouter with a get_block_id() handler, Cédric Le Goater, 2019/09/18
- [Qemu-ppc] [PATCH v4 21/25] ppc/pnv: Quiesce some XIVE errors, Cédric Le Goater, 2019/09/18
- [Qemu-ppc] [PATCH v4 22/25] ppc/xive: Introduce a xive_os_cam_decode() helper, Cédric Le Goater, 2019/09/18
- [Qemu-ppc] [PATCH v4 23/25] ppc/xive: Check V bit in TM_PULL_POOL_CTX, Cédric Le Goater, 2019/09/18
- [Qemu-ppc] [PATCH v4 24/25] ppc/pnv: Improve trigger data definition, Cédric Le Goater, 2019/09/18
- [Qemu-ppc] [PATCH v4 25/25] ppc/pnv: Use the EAS trigger bit when triggering an interrupt from PSI, Cédric Le Goater, 2019/09/18