Skip to content

ppc: support for the baremetal XIVE interrupt controller (POWER9)

Cédric Le Goater qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest19 patches 30 repliesIn review

Changes in v1 from the cover letter

- made more use of the register values instead of caching them under PnvXive
- generalized the VST accessors.
- reworked indirect accesses to the TIMA with a custom get_tctx() method
- fixed the translation table definitions
- XiveSource and XiveENDSource objects are now sized to the maximum allowed by HW and the memory regions exposing the ESB pages are resized at runtime when the firmware configures the controller.
- included changes from Ben on the POWER9 core model to fix power management instructions, add support for sreset and the HV interrupt line

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/19ppc/xive: hardwire the Physical CAM line of the thread contexthw/intc/xive.c hw/ppc/pnv_core.c include/hw/ppc/xive.h+61 -92 replies
2/19ppc: externalize ppc_get_vcpu_by_pir()hw/ppc/pnv.c hw/ppc/ppc.c include/hw/ppc/ppc.h+17 -160 replies
3/19xive: extend the XiveRouter get_tctx() method with the page offsethw/intc/spapr_xive.c hw/intc/xive.c include/hw/ppc/xive.h+11 -83 replies
4/19ppc/pnv: xive: export the TIMA memory accessorshw/intc/xive.c include/hw/ppc/xive.h+23 -70 replies
5/19ppc/pnv: add XIVE supporthw/intc/Makefile.objs hw/intc/pnv_xive.c hw/intc/pnv_xive_regs.h +7 more+2253 -105 replies
6/19target/ppc: Remove some #if 0'ed codetarget/ppc/excp_helper.c target/ppc/mmu_helper.c+0 -241 reply
7/19target/ppc: Make special ORs match x86 pause and don't generate on mttcgtarget/ppc/translate.c+4 -24 replies
8/19target/ppc: Fix nip on power management instructionstarget/ppc/excp_helper.c target/ppc/translate.c+8 -53 replies
9/19target/ppc: Don't clobber MSR:EE on PM instructionstarget/ppc/excp_helper.c+15 -121 reply
10/19target/ppc: Fix support for "STOP light" states on POWER9target/ppc/cpu-qom.h target/ppc/cpu.h target/ppc/excp_helper.c +2 more+35 -61 reply
11/19target/ppc: Move "wakeup reset" code to a separate functiontarget/ppc/excp_helper.c+41 -341 reply
12/19target/ppc: Disable ISA 2.06 PM instructions on POWER9target/ppc/translate_init.inc.c+1 -11 reply
13/19target/ppc: Rename "in_pm_state" to "resume_as_sreset"hw/ppc/ppc.c target/ppc/cpu.h target/ppc/excp_helper.c+8 -81 reply
14/19target/ppc: Add POWER9 exception modeltarget/ppc/cpu-qom.h target/ppc/excp_helper.c target/ppc/translate.c +1 more+18 -61 reply
15/19target/ppc: Detect erroneous condition in interrupt deliverytarget/ppc/excp_helper.c+16 -01 reply
16/19target/ppc: Add Hypervisor Virtualization Interrupt on POWER9target/ppc/cpu.h target/ppc/excp_helper.c target/ppc/translate_init.inc.c+35 -31 reply
17/19target/ppc: Add POWER9 external interrupt modelhw/intc/xics.c hw/intc/xive.c hw/ppc/ppc.c +4 more+29 -32 replies
18/19ppc/xive: Make XIVE generate the proper interrupt typeshw/intc/xive.c include/hw/ppc/xive.h+21 -41 reply
19/19target/ppc: Add support for LPCR:HEIC on POWER9target/ppc/excp_helper.c target/ppc/translate_init.inc.c+8 -21 reply

Reviews trailers per patch

9 of 19 patches have a Reviewed-by or Acked-by.

PatchDavid Gibson
1/19
2/19
3/19
4/19
5/19
6/19
7/19
8/19
9/19R-b
10/19R-b
11/19R-b
12/19
13/19R-b
14/19R-b
15/19R-b
16/19R-b
17/19
18/19R-b
19/19R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 00/19] ppc: support for the baremetal XIVE interrupt controller (POWER9)

Hello,

Here is a series adding support for the XIVE interrupt controller as found on POWER9 PowerNV mchines. It includes models for the baremetal IC itself and a set of fixes and extensions of the POWER9 core provided by Ben.

Thanks,

C.

Changes in v1 (since PnvXive was last sent) :

- made more use of the register values instead of caching them under PnvXive
- generalized the VST accessors.
- reworked indirect accesses to the TIMA with a custom get_tctx() method
- fixed the translation table definitions
- XiveSource and XiveENDSource objects are now sized to the maximum allowed by HW and the memory regions exposing the ESB pages are resized at runtime when the firmware configures the controller.
- included changes from Ben on the POWER9 core model to fix power management instructions, add support for sreset and the HV interrupt line

Benjamin Herrenschmidt (14):
target/ppc: Remove some #if 0'ed code
target/ppc: Make special ORs match x86 pause and don't generate on
mttcg
target/ppc: Fix nip on power management instructions target/ppc: Don't clobber MSR:EE on PM instructions target/ppc: Fix support for "STOP light" states on POWER9 target/ppc: Move "wakeup reset" code to a separate function target/ppc: Disable ISA 2.06 PM instructions on POWER9 target/ppc: Rename "in_pm_state" to "resume_as_sreset" target/ppc: Add POWER9 exception model
target/ppc: Detect erroneous condition in interrupt delivery target/ppc: Add Hypervisor Virtualization Interrupt on POWER9 target/ppc: Add POWER9 external interrupt model ppc/xive: Make XIVE generate the proper interrupt types target/ppc: Add support for LPCR:HEIC on POWER9

Cédric Le Goater (5):
ppc/xive: hardwire the Physical CAM line of the thread context
ppc: externalize ppc_get_vcpu_by_pir()
xive: extend the XiveRouter get_tctx() method with the page offset ppc/pnv: xive: export the TIMA memory accessors ppc/pnv: add XIVE support

 hw/intc/pnv_xive_regs.h         |  315 ++++++
 include/hw/ppc/pnv.h            |   21 +
 include/hw/ppc/pnv_core.h       |    1 +
 include/hw/ppc/pnv_xive.h       |   95 ++
 include/hw/ppc/pnv_xscom.h      |    3 +
 include/hw/ppc/ppc.h            |    3 +
 include/hw/ppc/xive.h           |   12 +-
 target/ppc/cpu-qom.h            |    5 +
 target/ppc/cpu.h                |   26 +-
 hw/intc/pnv_xive.c              | 1698 +++++++++++++++++++++++++++++++
 hw/intc/spapr_xive.c            |    3 +-
 hw/intc/xics.c                  |    1 +
 hw/intc/xive.c                  |  167 ++-
 hw/ppc/pnv.c                    |   84 +-
 hw/ppc/pnv_core.c               |   16 +-
 hw/ppc/ppc.c                    |   32 +-
 target/ppc/excp_helper.c        |  176 ++--
 target/ppc/mmu_helper.c         |   12 -
 target/ppc/translate.c          |   34 +-
 target/ppc/translate_init.inc.c |   36 +-
 hw/intc/Makefile.objs           |    2 +-
 21 files changed, 2593 insertions(+), 149 deletions(-)
 create mode 100644 hw/intc/pnv_xive_regs.h
 create mode 100644 include/hw/ppc/pnv_xive.h
 create mode 100644 hw/intc/pnv_xive.c
Signature · 1 line
2.20.1