Skip to content

Refactor cpu topo into machine properties

Like Xu qemu-arm qemu-devel qemu-trivial 3 versions – Applied

Status from this message: Queued on machine-next, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest10 patches 19 repliesApplied
  2. v210 patches 12 repliesSuperseded
  3. v19 patches 27 repliesSuperseded

Changes in v3 from the cover letter

- rephrase commit messages
- s/of/of present/ for CpuTopology comment
- drop reduanct arguments such as cpu_type
- use ms instead of macs in migration context
- rebase to commit 1b46b4daa6

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/10hw/boards: Add struct CpuTopology to MachineStateinclude/hw/boards.h vl.c+20 -00 replies
2/10machine: Refactor smp-related call chains to pass MachineStatehw/arm/virt.c hw/hppa/machine.c hw/i386/acpi-build.c +11 more+46 -440 replies
3/10general: Replace global smp variables with smp machine propertiesaccel/kvm/kvm-all.c backends/hostmem.c cpus.c +7 more+44 -110 replies
4/10hw/ppc: Replace global smp variables with machine smp propertieshw/ppc/e500.c hw/ppc/mac_newworld.c hw/ppc/mac_oldworld.c +4 more+42 -155 replies
5/10hw/riscv: Replace global smp variables with machine smp propertieshw/riscv/sifive_e.c hw/riscv/sifive_plic.c hw/riscv/sifive_u.c +2 more+14 -43 replies
6/10hw/s390x: Replace global smp variables with machine smp propertieshw/s390x/s390-virtio-ccw.c hw/s390x/sclp.c target/s390x/cpu.c +1 more+11 -24 replies
7/10hw/i386: Replace global smp variables with machine smp propertieshw/i386/acpi-build.c hw/i386/kvmvapic.c hw/i386/pc.c +2 more+34 -161 reply
8/10hw/arm: Replace global smp variables with machine smp propertieshw/arm/fsl-imx6.c hw/arm/fsl-imx6ul.c hw/arm/fsl-imx7.c +10 more+56 -231 reply
9/10hw: Replace global smp variables with MachineState for all remaining archshw/alpha/dp264.c hw/hppa/machine.c hw/mips/boston.c +6 more+13 -41 reply
10/10vl.c: Replace smp global variables with smp machine propertiesvl.c+26 -271 reply

Reviews trailers per patch

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

PatchAlistair FrancisEduardo HabkostDavid GibsonChristian BorntraegerCornelia HuckLike Xu
1/10R-b
2/10R-b
3/10R-b
4/10A-b
5/10R-b R-b
6/10A-b R-b
7/10R-b
8/10R-b
9/10R-b
10/10R-b R-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 6 reviewers.

Read the v3 thread

Cover letter [Qemu-devel] [PATCH v3 00/10] Refactor cpu topo into machine properties

This patch series make existing cores/threads/sockets into machine properties and get rid of global smp_* variables they use currently.

The purpose of getting rid of globals is disentangle layer violations and let's do it one step at a time by replacing the smp_foo with qdev_get_machine() as few calls as possible and delay other related refactoring efforts.

==changelog==

v3:

- rephrase commit messages
- s/of/of present/ for CpuTopology comment
- drop reduanct arguments such as cpu_type
- use ms instead of macs in migration context
- rebase to commit 1b46b4daa6

v2: https://patchwork.ozlabs.org/cover/1095727/

- pass MachineState via call chain with trivial fixups
- replace smp_cpus directly at places if it's only used once
- s/topo/smp/ and drop smp_ prefix inside CpuTopology structure
- add more commit messages to explaining what patch does
- fix Patchew build failure for xen usage
- use macs rather than ms in migration context for MigrationState
- cleanup unrelated and redundant changes
- spilt OpenRISC and RISC-V related patches

v1: https://patchwork.kernel.org/cover/10876667/

Like Xu (10):
hw/boards: Add struct CpuTopology to MachineState
machine: Refactor smp-related call chains to pass MachineState
general: Replace global smp variables with smp machine properties hw/ppc: Replace global smp variables with machine smp properties hw/riscv: Replace global smp variables with machine smp properties hw/s390x: Replace global smp variables with machine smp properties hw/i386: Replace global smp variables with machine smp properties hw/arm: Replace global smp variables with machine smp properties
hw: Replace global smp variables with MachineState for all remaining archs vl.c: Replace smp global variables with smp machine properties

 accel/kvm/kvm-all.c          |  4 +--
 backends/hostmem.c           |  6 +++--
 cpus.c                       |  6 +++--
 exec.c                       |  3 ++-
 gdbstub.c                    |  4 +++
 hw/alpha/dp264.c             |  1 +
 hw/arm/fsl-imx6.c            |  6 ++++-
 hw/arm/fsl-imx6ul.c          |  6 ++++-
 hw/arm/fsl-imx7.c            |  7 +++--
 hw/arm/highbank.c            |  1 +
 hw/arm/mcimx6ul-evk.c        |  2 +-
 hw/arm/mcimx7d-sabre.c       |  2 +-
 hw/arm/raspi.c               |  4 +--
 hw/arm/realview.c            |  1 +
 hw/arm/sabrelite.c           |  2 +-
 hw/arm/vexpress.c            | 16 +++++++-----
 hw/arm/virt.c                | 10 ++++++--
 hw/arm/xlnx-zynqmp.c         | 16 +++++++-----
 hw/cpu/core.c                |  4 ++-
 hw/hppa/machine.c            |  4 ++-
 hw/i386/acpi-build.c         | 13 ++++++----
 hw/i386/kvmvapic.c           |  7 +++--
 hw/i386/pc.c                 | 33 ++++++++++++++----------
 hw/i386/xen/xen-hvm.c        |  4 +++
 hw/mips/boston.c             |  2 +-
 hw/mips/mips_malta.c         | 24 +++++++++--------
 hw/openrisc/openrisc_sim.c   |  1 +
 hw/ppc/e500.c                |  3 +++
 hw/ppc/mac_newworld.c        |  3 ++-
 hw/ppc/mac_oldworld.c        |  3 ++-
 hw/ppc/pnv.c                 |  9 ++++---
 hw/ppc/prep.c                |  4 +--
 hw/ppc/spapr.c               | 37 ++++++++++++++++++--------
 hw/ppc/spapr_rtas.c          |  4 ++-
 hw/riscv/sifive_e.c          |  6 +++--
 hw/riscv/sifive_plic.c       |  3 +++
 hw/riscv/sifive_u.c          |  6 +++--
 hw/riscv/spike.c             |  2 ++
 hw/riscv/virt.c              |  1 +
 hw/s390x/s390-virtio-ccw.c   |  9 ++++---
 hw/s390x/sclp.c              |  2 +-
 hw/smbios/smbios.c           | 26 +++++++++++--------
 hw/sparc/sun4m.c             |  2 ++
 hw/sparc64/sun4u.c           |  4 +--
 hw/xtensa/sim.c              |  2 +-
 hw/xtensa/xtfpga.c           |  1 +
 include/hw/boards.h          | 19 ++++++++++++--
 include/hw/firmware/smbios.h |  5 ++--
 include/hw/i386/pc.h         |  2 +-
 migration/postcopy-ram.c     |  8 +++++-
 numa.c                       |  1 +
 qmp.c                        |  2 +-
 target/arm/cpu.c             |  8 +++++-
 target/i386/cpu.c            |  4 ++-
 target/openrisc/sys_helper.c |  6 ++++-
 target/s390x/cpu.c           |  3 +++
 target/s390x/excp_helper.c   |  5 ++++
 tcg/tcg.c                    | 13 +++++++++-
 vl.c                         | 50 +++++++++++++++++++-----------------
 59 files changed, 301 insertions(+), 141 deletions(-)
Signature · 1 line
2.21.0