Skip to content

ppc: reset the interrupt presenter from the CPU reset handler

Cédric Le Goater qemu-devel 4 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest7 patches 16 repliesIn review
  2. v4 posting 2/27 patches 4 repliesSuperseded
  3. v4 posting 1/26 patches 1 replySuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v34 patches7 repliesSuperseded

Changes in v5 from the cover letter

- Removed useless PNV_CHIP() cast

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7spapr: move CPU reset after presenter creationhw/ppc/spapr_cpu_core.c+8 -60 replies
2/7spapr_cpu_core: Implement DeviceClass::resethw/ppc/spapr_cpu_core.c+28 -90 replies
3/7ppc/pnv: Introduce a PnvCore reset handlerhw/ppc/pnv_core.c+15 -42 replies
4/7ppc/pnv: Add a PnvChip pointer to PnvCorehw/ppc/pnv_core.c include/hw/ppc/pnv_core.h+5 -18 replies
5/7ppc: Reset the interrupt presenter from the CPU reset handlerhw/intc/spapr_xive.c hw/intc/xics.c hw/intc/xics_spapr.c +9 more+65 -203 replies
6/7ppc/pnv: Fix naming of routines realizing the CPUshw/ppc/pnv_core.c+4 -41 reply
7/7spapr/xive: Set the OS CAM line at resethw/intc/spapr_xive.c include/hw/ppc/spapr_xive.h+17 -321 reply

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchPhilippe Mathieu-DaudéGreg Kurz
1/7R-b R-b
2/7R-b
3/7R-b
4/7R-b R-b
5/7R-b R-b
6/7R-b R-b
7/7R-b

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

Read the v5 thread

Cover letter [PATCH v5 0/7] ppc: reset the interrupt presenter from the CPU reset handler

Hello,

On the sPAPR machine and PowerNV machine, the interrupt presenters are created by a machine handler at the core level and are reseted independently. This is not consistent and it raises issues when it comes to handle hot-plugged CPUs. In that case, the presenters are not reseted. This is less of an issue in XICS, although a zero MFFR could be a concern, but in XIVE, the OS CAM line is not set and this breaks the presenting algorithm. The current code has workarounds which need a global cleanup.

Extend the sPAPR IRQ backend and the PowerNV Chip class with a new cpu_intc_reset() handler called by the CPU reset handler and remove the XiveTCTX reset handler which is now redundant.

Set the OS CAM line when the interrupt presenter of the sPAPR core is reseted. This will also cover the case of hot-plugged CPUs.

Thanks,

C.

Changes in v5:

- Removed useless PNV_CHIP() cast

Changes in v4:

- Introduce a PnvCore reset handler
- Add PnvChip pointer to PnvCore

Changes in v3:

- Introduced a DeviceClass::reset for the CPU (Greg)
- add support for PowerNV

Changes in v2:

- removed property
- simplified reset handlers

Cédric Le Goater (6):
spapr: move CPU reset after presenter creation ppc/pnv: Introduce a PnvCore reset handler
ppc/pnv: Add a PnvChip pointer to PnvCore
ppc: Reset the interrupt presenter from the CPU reset handler ppc/pnv: Fix naming of routines realizing the CPUs spapr/xive: Set the OS CAM line at reset

Greg Kurz (1):
spapr_cpu_core: Implement DeviceClass::reset

 include/hw/ppc/pnv.h        |  1 +
 include/hw/ppc/pnv_core.h   |  3 +++
 include/hw/ppc/spapr_irq.h  |  2 ++
 include/hw/ppc/spapr_xive.h |  1 -
 include/hw/ppc/xics.h       |  1 +
 include/hw/ppc/xive.h       |  1 +
 hw/intc/spapr_xive.c        | 53 +++++++++++++++++--------------------
 hw/intc/xics.c              |  8 ++----
 hw/intc/xics_spapr.c        |  7 +++++
 hw/intc/xive.c              | 12 +--------
 hw/ppc/pnv.c                | 18 +++++++++++++
 hw/ppc/pnv_core.c           | 31 ++++++++++++++++------
 hw/ppc/spapr_cpu_core.c     | 44 +++++++++++++++++++++++-------
 hw/ppc/spapr_irq.c          | 14 ++++++++++
 14 files changed, 131 insertions(+), 65 deletions(-)
Signature · 1 line
2.21.0