Skip to content

hw/core/cpu: Remove @CPUState::as field

Philippe Mathieu-Daudé qemu-arm qemu-devel qemu-riscv 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest22 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/22system/qtest: Use &address_space_memory for first vCPU address spacesystem/qtest.c+14 -130 replies
2/22disas/disas-mon: Get cpu first addr space with cpu_get_address_space()disas/disas-mon.c+2 -11 reply
3/22monitor/hmp-cmds: Get cpu first addr space with cpu_get_address_space()monitor/hmp-cmds-target.c+2 -12 replies
4/22hw/core/loader: Get cpu first addr space with cpu_get_address_space()hw/core/generic-loader.c+3 -21 reply
5/22hw/ppc: Get cpu first addr space with cpu_get_address_space()hw/intc/spapr_xive.c hw/ppc/pegasos2.c hw/ppc/spapr.c +3 more+65 -561 reply
6/22hw/m86k: Get cpu first addr space with cpu_get_address_space()hw/m68k/mcf5208.c hw/m68k/q800.c hw/m68k/virt.c+17 -111 reply
7/22target/xtensa: Get cpu first addr space with cpu_get_address_space()target/xtensa/mmu_helper.c+2 -10 replies
8/22target/riscv: Get cpu first addr space with cpu_get_address_space()target/riscv/cpu_helper.c+4 -30 replies
9/22semihosting: Get cpu first addr space with cpu_get_address_space()semihosting/arm-compat-semi.c+3 -10 replies
10/22target/alpha: Get cpu first addr space with cpu_get_address_space()target/alpha/helper.c+5 -30 replies
11/22target/arm: Get cpu first addr space with cpu_get_address_space()target/arm/cpu.c+4 -30 replies
12/22target/hppa: Get cpu first addr space with cpu_get_address_space()target/hppa/int_helper.c+2 -10 replies
13/22target/i386: Get cpu first addr space with cpu_get_address_space()target/i386/arch_memory_mapping.c+6 -40 replies
14/22target/loongarch: Get cpu first addr space with cpu_get_address_space()target/loongarch/cpu_helper.c target/loongarch/tcg/tlb_helper.c+8 -40 replies
15/22target/m68k: Get cpu first addr space with cpu_get_address_space()target/m68k/helper.c+15 -130 replies
16/22target/microblaze: Get cpu first addr space with cpu_get_address_space()target/microblaze/op_helper.c+4 -20 replies
17/22target/ppc: Get cpu first addr space with cpu_get_address_space()target/ppc/excp_helper.c target/ppc/mmu-book3s-v3.c target/ppc/mmu-hash32.c +3 more+32 -200 replies
18/22target/s390x: Get cpu first addr space with cpu_get_address_space()target/s390x/cpu-system.c target/s390x/mmu_helper.c target/s390x/tcg/excp_helper.c +1 more+18 -110 replies
19/22target/sparc: Get cpu first addr space with cpu_get_address_space()target/sparc/ldst_helper.c target/sparc/mmu_helper.c+24 -190 replies
20/22hw/core/cpu: Remove @CPUState::as fieldhw/core/cpu-common.c include/hw/core/cpu.h system/cpus.c +1 more+1 -150 replies
21/22exec/cpu: Declare cpu_memory_rw_debug() in 'hw/core/cpu.h' and documentinclude/exec/cpu-common.h include/hw/core/cpu.h+20 -42 replies
22/22target/sparc: Reduce inclusions of 'exec/cpu-common.h'target/sparc/cpu.h target/sparc/helper.c target/sparc/int64_helper.c+2 -10 replies

Reviews trailers per patch

3 of 22 patches have a Reviewed-by or Acked-by.

PatchGlenn MilesZhao LiuThomas Huth
1/22
2/22
3/22
4/22
5/22R-b
6/22R-b
7/22
8/22
9/22
10/22
11/22
12/22
13/22
14/22
15/22
16/22
17/22
18/22
19/22
20/22
21/22R-b
22/22

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

Read the v1 thread

Cover letter [PATCH 00/22] hw/core/cpu: Remove @CPUState::as field

Instead of using the convenient @CPUState::as shortcut, use cpu_get_address_space(asidx=0) to get the vCPU first address space.

The goal is to reduce the risk of AS mis-use for targets that uses multiple ASes per vCPU.

Based-on: <[email protected]>

Philippe Mathieu-Daudé (22):
system/qtest: Use &address_space_memory for first vCPU address space disas/disas-mon: Get cpu first addr space with cpu_get_address_space() monitor/hmp-cmds: Get cpu first addr space with
cpu_get_address_space()
hw/core/loader: Get cpu first addr space with cpu_get_address_space() hw/ppc: Get cpu first addr space with cpu_get_address_space() hw/m86k: Get cpu first addr space with cpu_get_address_space() target/xtensa: Get cpu first addr space with cpu_get_address_space() target/riscv: Get cpu first addr space with cpu_get_address_space()
semihosting: Get cpu first addr space with cpu_get_address_space() target/alpha: Get cpu first addr space with cpu_get_address_space() target/arm: Get cpu first addr space with cpu_get_address_space() target/hppa: Get cpu first addr space with cpu_get_address_space() target/i386: Get cpu first addr space with cpu_get_address_space() target/loongarch: Get cpu first addr space with
cpu_get_address_space()
target/m68k: Get cpu first addr space with cpu_get_address_space() target/microblaze: Get cpu first addr space with
cpu_get_address_space()
target/ppc: Get cpu first addr space with cpu_get_address_space() target/s390x: Get cpu first addr space with cpu_get_address_space() target/sparc: Get cpu first addr space with cpu_get_address_space() hw/core/cpu: Remove @CPUState::as field
exec/cpu: Declare cpu_memory_rw_debug() in 'hw/core/cpu.h' and
document
target/sparc: Reduce inclusions of 'exec/cpu-common.h'

 include/exec/cpu-common.h         |  4 ---
 include/hw/core/cpu.h             | 23 +++++++++++--
 target/ppc/mmu-hash32.h           | 12 ++++---
 target/sparc/cpu.h                |  1 -
 disas/disas-mon.c                 |  3 +-
 hw/core/cpu-common.c              |  1 -
 hw/core/generic-loader.c          |  5 +--
 hw/intc/spapr_xive.c              |  5 +--
 hw/m68k/mcf5208.c                 |  6 ++--
 hw/m68k/q800.c                    | 17 ++++++----
 hw/m68k/virt.c                    |  5 +--
 hw/ppc/pegasos2.c                 |  2 +-
 hw/ppc/spapr.c                    | 12 +++----
 hw/ppc/spapr_hcall.c              | 55 ++++++++++++++++---------------
 hw/ppc/spapr_iommu.c              |  4 +--
 hw/ppc/spapr_nested.c             | 43 +++++++++++++-----------
 monitor/hmp-cmds-target.c         |  3 +-
 semihosting/arm-compat-semi.c     |  4 ++-
 system/cpus.c                     |  2 +-
 system/physmem.c                  | 10 ------
 system/qtest.c                    | 27 +++++++--------
 target/alpha/helper.c             |  8 +++--
 target/arm/cpu.c                  |  7 ++--
 target/hppa/int_helper.c          |  3 +-
 target/i386/arch_memory_mapping.c | 10 +++---
 target/loongarch/cpu_helper.c     |  5 +--
 target/loongarch/tcg/tlb_helper.c |  7 ++--
 target/m68k/helper.c              | 28 ++++++++--------
 target/microblaze/op_helper.c     |  6 ++--
 target/ppc/excp_helper.c          |  4 +--
 target/ppc/mmu-book3s-v3.c        |  5 +--
 target/ppc/mmu-hash32.c           |  6 ++--
 target/ppc/mmu-hash64.c           | 12 ++++---
 target/ppc/mmu-radix64.c          | 13 ++++----
 target/riscv/cpu_helper.c         |  7 ++--
 target/s390x/cpu-system.c         |  4 ++-
 target/s390x/mmu_helper.c         |  9 ++---
 target/s390x/tcg/excp_helper.c    | 10 +++---
 target/s390x/tcg/mem_helper.c     |  6 ++--
 target/sparc/helper.c             |  1 +
 target/sparc/int64_helper.c       |  1 +
 target/sparc/ldst_helper.c        | 22 +++++++------
 target/sparc/mmu_helper.c         | 21 +++++++-----
 target/xtensa/mmu_helper.c        |  3 +-
 44 files changed, 253 insertions(+), 189 deletions(-)
Signature · 1 line
2.51.0