Skip to content

ppc/pnv: Better big-core model, lpar-per-core, PC unit

Nicholas Piggin qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest19 patches 6 repliesIn review
  2. v219 patches 12 repliesSuperseded
  3. v118 patches 10 repliesSuperseded

Changes in v3 from the cover letter

- Converted big-core, lpar-per-core, and big-core tb quirk to object properties APIs in PnvChip and PnvCore, suggested by Cedric.
- Removed a stray cleanup hunk noticed by clg.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/19target/ppc: Fix msgsnd for POWER8target/ppc/excp_helper.c+44 -301 reply
2/19ppc/pnv: Add pointer from PnvCPUState to PnvCorehw/ppc/pnv_core.c include/hw/ppc/pnv_core.h+4 -00 replies
3/19ppc/pnv: Move timebase state into PnvCorehw/ppc/pnv_chiptod.c include/hw/ppc/pnv_core.h target/ppc/cpu.h +1 more+49 -490 replies
4/19target/ppc: Move SPR indirect registers into PnvCoreinclude/hw/ppc/pnv_core.h target/ppc/cpu.h target/ppc/cpu_init.c +1 more+39 -460 replies
5/19ppc/pnv: use class attribute to limit SMT threads for different machineshw/ppc/pnv.c include/hw/ppc/pnv.h+10 -30 replies
6/19ppc/pnv: Extend chip_pir class method to TIR as wellhw/ppc/pnv.c hw/ppc/pnv_core.c include/hw/ppc/pnv_chip.h+64 -350 replies
7/19ppc: Add a core_index to CPUPPCState for SMT vCPUshw/ppc/pnv_core.c hw/ppc/spapr_cpu_core.c target/ppc/cpu.h+11 -40 replies
8/19target/ppc: Add helpers to check for SMT sibling threadstarget/ppc/cpu.h target/ppc/cpu_init.c target/ppc/excp_helper.c +2 more+30 -470 replies
9/19ppc: Add has_smt_siblings property to CPUPPCStatehw/ppc/pnv_core.c hw/ppc/spapr_cpu_core.c target/ppc/cpu.h+14 -40 replies
10/19ppc/pnv: Add a big-core mode that joins two regular coreshw/ppc/pnv.c hw/ppc/pnv_core.c include/hw/ppc/pnv.h +2 more+78 -140 replies
11/19ppc/pnv: Add allow for big-core differences in DT generationhw/ppc/pnv.c+35 -81 reply
12/19ppc/pnv: Implement big-core PVR for Power9/10hw/ppc/pnv_core.c+4 -00 replies
13/19ppc/pnv: Implement Power9 CPU core thread state indirect registertarget/ppc/misc_helper.c+17 -01 reply
14/19ppc/pnv: Add POWER10 ChipTOD quirk for big-corehw/ppc/pnv.c hw/ppc/pnv_core.c include/hw/ppc/pnv.h +2 more+25 -11 reply
15/19ppc/pnv: Add big-core machine propertyhw/ppc/pnv.c+45 -161 reply
16/19system/cpus: Add cpu_pause() functioninclude/hw/core/cpu.h system/cpus.c+25 -130 replies
17/19ppc/pnv: Add a CPU nmi and resume functionhw/ppc/pnv.c include/hw/ppc/pnv.h+15 -10 replies
18/19ppc/pnv: Implement POWER10 PC xscom registers for direct controlshw/ppc/pnv_core.c include/hw/ppc/pnv_core.h+87 -50 replies
19/19ppc/pnv: Add an LPAR per core machine optionhw/ppc/pnv.c hw/ppc/pnv_core.c include/hw/ppc/pnv.h +3 more+52 -11 reply

Reviews trailers per patch

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

PatchCédric Le GoaterHarsh Prateek BoraPhilippe Mathieu-DaudéPeter Xu
1/19R-b
2/19R-b R-b
3/19R-b
4/19
5/19R-b R-b
6/19R-b
7/19R-b
8/19R-b
9/19R-b
10/19
11/19R-b
12/19R-b
13/19R-b
14/19R-b
15/19R-b
16/19R-b R-b
17/19R-b
18/19
19/19R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v3 thread

Cover letter [PATCH v3 00/19] ppc/pnv: Better big-core model, lpar-per-core, PC unit

Primary motivation for this series is to improve big-core support.

This also fixes POWER8 SMT running Linux with the msgsnd fix and setting lpar-per-core mode (which is always true on POWER8).

Since v2:
- Converted big-core, lpar-per-core, and big-core tb quirk to object properties APIs in PnvChip and PnvCore, suggested by Cedric.
- Removed a stray cleanup hunk noticed by clg.

Since v1:
- Remove chip->pnv_machine pointer addition.
- Split cpu_pause() function into its own patch.
- Remove the _CORE_ID macro.
- Add has_lpar_per_thread machine class attribute to initialize the lpar mode to per-core on POWER8 machines instead of testing presence of machine state property.

Since rfc:
- Fixed POWER8 SMT so it doesn't have to be disabled.
- Fixed inadvertent spapr SMT bug.
- Renamed PnvCPUState.core pointer to pnv_core. (Harsh)
- Moved where it is initialised (clg)
- Avoided most qdev_get_machine() calls by adding a PnvMachineState pointer from PnvChip, new patch 3 (clg).
- Rename TB state to use camel case (Harsh and clg)
- Add comment to explain SPRC/SPRD is only accessed with powernv.
- Use mc->desc for error messages and avoid splitting machine init handlers (Harsh).
- Add max_smt_threads class attribute to avoid duplicating checks (clg)
- Rename processor_id() class method to get_pir_tir (Harsh and clg)
- Add a comment for get_pir_tir() (clg)
- Allow get_pir_tir() to be passed NULL pointers to avoid dummy pir/tir variables (Harsh)
- Move the PPC_CPU_HAS_CORE_SIBLINGS macros to inline functions (clg)
- Invert them (test for single-thread rather than for siblings) because the callers read a little better that way (Harsh).
- Propagate lpar and big-core options down to chip and core levels rather than having to test machine (clg)
- Significantly split the big-core patch (clg).
- Rework big-core device-tree handling to simplify it (clg).
- Make new has_smt_siblings property bool (Harsh)
- Make the big-core timebase tod quirk a machine class property rather than machine state (Harsh).

Thanks,
Nick

Nicholas Piggin (19):
target/ppc: Fix msgsnd for POWER8
ppc/pnv: Add pointer from PnvCPUState to PnvCore ppc/pnv: Move timebase state into PnvCore
target/ppc: Move SPR indirect registers into PnvCore ppc/pnv: use class attribute to limit SMT threads for different
machines
ppc/pnv: Extend chip_pir class method to TIR as well
ppc: Add a core_index to CPUPPCState for SMT vCPUs target/ppc: Add helpers to check for SMT sibling threads
ppc: Add has_smt_siblings property to CPUPPCState ppc/pnv: Add a big-core mode that joins two regular cores ppc/pnv: Add allow for big-core differences in DT generation ppc/pnv: Implement big-core PVR for Power9/10
ppc/pnv: Implement Power9 CPU core thread state indirect register ppc/pnv: Add POWER10 ChipTOD quirk for big-core ppc/pnv: Add big-core machine property
system/cpus: Add cpu_pause() function
ppc/pnv: Add a CPU nmi and resume function
ppc/pnv: Implement POWER10 PC xscom registers for direct controls ppc/pnv: Add an LPAR per core machine option

 include/hw/core/cpu.h        |   8 +
 include/hw/ppc/pnv.h         |   8 +
 include/hw/ppc/pnv_chip.h    |   6 +-
 include/hw/ppc/pnv_core.h    |  31 ++++
 target/ppc/cpu.h             |  45 ++---
 hw/ppc/pnv.c                 | 310 ++++++++++++++++++++++++++++-------
 hw/ppc/pnv_chiptod.c         |   7 +-
 hw/ppc/pnv_core.c            | 127 +++++++++++++-
 hw/ppc/spapr_cpu_core.c      |  16 +-
 system/cpus.c                |  30 ++--
 target/ppc/cpu_init.c        |  26 +--
 target/ppc/excp_helper.c     |  69 ++++----
 target/ppc/misc_helper.c     | 104 ++++++------
 target/ppc/timebase_helper.c |  82 ++++-----
 14 files changed, 620 insertions(+), 249 deletions(-)
Signature · 1 line
2.45.1