Skip to content

ppc/pnv: add XIVE support for KVM guests

Cédric Le Goater qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest17 patches 6 repliesIn review
  2. v110 patches 12 repliesApplied

Changes in v2 from the cover letter

- minor extra fixes
- split the escalation support in different patches
- kept the XiveRouter type for XiveTCTX back pointer (will address this in P10)
- removed pnv_xive_vst_size(). Really broken on indirect tables.
- improved the dump of the NVT table
- introduce pnv_xive_get_block_id()

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17ppc/xive: use an abstract type for XiveNotifierinclude/hw/ppc/xive.h+2 -40 replies
2/17ppc/pnv: add more dummy XSCOM addresses for the P9 CAPPhw/ppc/pnv_xscom.c+20 -00 replies
3/17ppc/xive: Implement TM_PULL_OS_CTX special commandhw/intc/xive.c+14 -10 replies
4/17ppc/xive: Provide backlog supporthw/intc/xive.c+48 -290 replies
5/17ppc/xive: Provide escalation supporthw/intc/xive.c+16 -00 replies
6/17ppc/xive: Provide unconditional escalation supporthw/intc/xive.c include/hw/ppc/xive_regs.h+37 -90 replies
7/17ppc/xive: Provide silent escalation supporthw/intc/xive.c include/hw/ppc/xive_regs.h+10 -01 reply
8/17ppc/xive: Improve 'info pic' supporthw/intc/pnv_xive.c hw/intc/spapr_xive.c hw/intc/xive.c +2 more+57 -120 replies
9/17ppc/xive: Extend XiveTCTX with a XiveRouter pointerhw/intc/xive.c include/hw/ppc/xive.h+11 -04 replies
10/17ppc/xive: Introduce xive_tctx_ipb_update()hw/intc/xive.c include/hw/ppc/xive.h+12 -40 replies
11/17ppc/xive: Synthesize interrupt from the saved IPB in the NVThw/intc/xive.c include/hw/ppc/xive.h include/hw/ppc/xive_regs.h+82 -130 replies
12/17ppc/pnv: Remove pnv_xive_vst_size() routinehw/intc/pnv_xive.c+43 -690 replies
13/17ppc/pnv: Dump the XIVE NVT tablehw/intc/pnv_xive.c include/hw/ppc/xive_regs.h+24 -00 replies
14/17ppc/pnv: Skip empty slots of the XIVE NVT tablehw/intc/pnv_xive.c+12 -40 replies
15/17ppc/pnv: Grab the XiveRouter object from XiveTCTX in pnv_xive_get_tctx()hw/intc/pnv_xive.c+1 -100 replies
16/17ppc/pnv: Introduce a pnv_xive_get_block_id() interface to XiveRouterhw/intc/pnv_xive.c hw/intc/spapr_xive.c hw/intc/xive.c +2 more+53 -340 replies
17/17ppc/pnv: quiesce some XIVE errorshw/intc/pnv_xive.c+5 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [Qemu-devel] [PATCH v2 00/17] ppc/pnv: add XIVE support for KVM guests

Hello,

The QEMU PowerNV machine emulates a baremetal OpenPOWER system and acts as an hypervisor (L0). Supporting emulation of KVM to run guests (L1) requires a few more extensions, among which guest support for the XIVE interrupt controller on POWER9 processor.

The following changes include some fixes for the PowerNV machine and provide support for XIVE escalations and interrupt resend. This mechanism is used by XIVE to notify the hypervisor that a vCPU is not dispatched on a HW thread. Tested on a QEMU PowerNV machine and a simple QEMU pseries guest doing network on a local bridge.

The XIVE interrupt controller offers a way to increase the XIVE resources per chip by configuring multiple XIVE blocks on a chip. This is not currently supported by the model. However, some configurations, such as OPAL/skiboot, use one block-per-chip configuration with some optimizations. One of them is to override the hardwired chip ID by the block id in the PowerBUS operations and for CAM compares. This patchset improves the support for this setup. Tested with 4 chips.

A series from Suraj adding guest support in the Radix MMU model of the QEMU PowerNV machine is still required and will be send later. The whole patchset can be found under :

https://github.com/legoater/qemu/tree/powernv-4.1

Thanks,

C.

Changes since v1:

- minor extra fixes
- split the escalation support in different patches
- kept the XiveRouter type for XiveTCTX back pointer (will address this in P10)
- removed pnv_xive_vst_size(). Really broken on indirect tables.
- improved the dump of the NVT table
- introduce pnv_xive_get_block_id()

Cédric Le Goater (17):
ppc/xive: use an abstract type for XiveNotifier ppc/pnv: add more dummy XSCOM addresses for the P9 CAPP ppc/xive: Implement TM_PULL_OS_CTX special command ppc/xive: Provide backlog support
ppc/xive: Provide escalation support
ppc/xive: Provide unconditional escalation support ppc/xive: Provide silent escalation support ppc/xive: Improve 'info pic' support
ppc/xive: Extend XiveTCTX with a XiveRouter pointer ppc/xive: Introduce xive_tctx_ipb_update() ppc/xive: Synthesize interrupt from the saved IPB in the NVT ppc/pnv: Remove pnv_xive_vst_size() routine ppc/pnv: Dump the XIVE NVT table
ppc/pnv: Skip empty slots of the XIVE NVT table ppc/pnv: Grab the XiveRouter object from XiveTCTX in

    pnv_xive_get_tctx()

ppc/pnv: Introduce a pnv_xive_get_block_id() interface to XiveRouter ppc/pnv: quiesce some XIVE errors

 include/hw/ppc/pnv_xive.h  |   3 -
 include/hw/ppc/xive.h      |  21 +--
 include/hw/ppc/xive_regs.h |  34 +++++
 hw/intc/pnv_xive.c         | 210 +++++++++++++------------
 hw/intc/spapr_xive.c       |   7 +-
 hw/intc/xive.c             | 304 ++++++++++++++++++++++++++++++-------
 hw/ppc/pnv_xscom.c         |  20 +++
 7 files changed, 428 insertions(+), 171 deletions(-)
Signature · 1 line
2.21.0