Skip to content

cpu: Introduce SysemuCPUOps structure

Philippe Mathieu-Daudé qemu-arm qemu-devel qemu-riscv 7 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest23 patches 8 repliesIn review
  2. v618 patches 7 repliesSuperseded
  3. v515 patches 1 replySuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v428 patches12 repliesApplied
v318 of 27 patches9 repliesSuperseded
v217 patches4 repliesSuperseded
v116 patches2 repliesSuperseded

Changes in v7 from the cover letter

- Rebased (3 targets removed, Claudio's target/i386 series merged)
- Addressed Richard & David comments

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/23NOTFORMERGE target/arm: Restrict MTE code to softmmutarget/arm/meson.build+5 -10 replies
2/23cpu: Restrict target cpu_do_transaction_failed() handlers to sysemutarget/arm/internals.h target/m68k/cpu.h target/riscv/cpu.h +1 more+13 -93 replies
3/23cpu: Restrict target cpu_do_unaligned_access() handlers to sysemutarget/alpha/cpu.h target/arm/internals.h target/arm/tlb_helper.c +12 more+56 -470 replies
4/23cpu: Remove duplicated 'sysemu/hw_accel.h' headerhw/core/cpu.c+0 -11 reply
5/23cpu: Split as cpu-common / cpu-sysemuhw/core/cpu-common.c hw/core/cpu-sysemu.c hw/core/meson.build+36 -181 reply
6/23cpu: Un-inline cpu_get_phys_page_debug and cpu_asidx_from_attrshw/core/cpu-sysemu.c include/hw/core/cpu.h+36 -290 replies
7/23cpu: Introduce cpu_virtio_is_big_endian()hw/core/cpu-common.c hw/core/cpu-sysemu.c hw/virtio/virtio.c +1 more+20 -90 replies
8/23cpu: Directly use cpu_write_elf*() fallback handlers in placehw/core/cpu-common.c hw/core/cpu-sysemu.c+44 -630 replies
9/23cpu: Directly use get_paging_enabled() fallback handlers in placehw/core/cpu-common.c hw/core/cpu-sysemu.c+11 -130 replies
10/23cpu: Directly use get_memory_mapping() fallback handlers in placehw/core/cpu-common.c hw/core/cpu-sysemu.c+13 -160 replies
11/23cpu: Assert DeviceClass::vmsd is NULL on user emulationcpu.c target/sh4/cpu.c target/xtensa/cpu.c+8 -30 replies
12/23cpu: Rename CPUClass vmsd -> legacy_vmsdcpu.c include/hw/core/cpu.h target/arm/cpu.c +7 more+17 -160 replies
13/23cpu: Move AVR target vmsd field from CPUClass to DeviceClasstarget/avr/cpu.c target/avr/machine.c+3 -31 reply
14/23cpu: Introduce SysemuCPUOps structureinclude/hw/core/cpu.h include/hw/core/sysemu-cpu-ops.h target/alpha/cpu.c +18 more+134 -00 replies
15/23cpu: Move CPUClass::vmsd to SysemuCPUOpscpu.c include/hw/core/cpu.h include/hw/core/sysemu-cpu-ops.h +9 more+22 -250 replies
16/23cpu: Move CPUClass::virtio_is_big_endian to SysemuCPUOpshw/core/cpu-sysemu.c include/hw/core/cpu.h include/hw/core/sysemu-cpu-ops.h +2 more+14 -110 replies
17/23cpu: Move CPUClass::get_crash_info to SysemuCPUOpshw/core/cpu-sysemu.c include/hw/core/cpu.h include/hw/core/sysemu-cpu-ops.h +2 more+9 -50 replies
18/23cpu: Move CPUClass::write_elf* to SysemuCPUOpshw/core/cpu-sysemu.c include/hw/core/cpu.h include/hw/core/sysemu-cpu-ops.h +5 more+43 -380 replies
19/23cpu: Move CPUClass::asidx_from_attrs to SysemuCPUOpshw/core/cpu-sysemu.c include/hw/core/cpu.h include/hw/core/sysemu-cpu-ops.h +2 more+9 -70 replies
20/23cpu: Move CPUClass::get_phys_page_debug to SysemuCPUOpshw/core/cpu-sysemu.c include/hw/core/cpu.h include/hw/core/sysemu-cpu-ops.h +35 more+63 -510 replies
21/23cpu: Move CPUClass::get_memory_mapping to SysemuCPUOpshw/core/cpu-sysemu.c include/hw/core/cpu.h include/hw/core/sysemu-cpu-ops.h +1 more+8 -60 replies
22/23cpu: Move CPUClass::get_paging_enabled to SysemuCPUOpshw/core/cpu-sysemu.c include/hw/core/cpu.h include/hw/core/sysemu-cpu-ops.h +1 more+9 -50 replies
23/23cpu: Restrict "hw/core/sysemu-cpu-ops.h" to target/cpu.ccpu.c include/hw/core/cpu.h target/alpha/cpu.h +19 more+57 -10 replies

Reviews trailers per patch

20 of 23 patches have a Reviewed-by or Acked-by.

PatchRichard HendersonClaudio FontanaTaylor Simpson
1/23
2/23
3/23
4/23R-b
5/23R-b
6/23R-b
7/23R-b
8/23R-b
9/23R-b
10/23R-b
11/23R-b
12/23R-b
13/23R-b
14/23R-b
15/23R-b
16/23R-b
17/23R-b
18/23R-b
19/23R-b
20/23R-b
21/23R-b
22/23R-b
23/23R-b Inspired-by 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 3 reviewers.

Read the v7 thread

Cover letter [PATCH v7 00/23] cpu: Introduce SysemuCPUOps structure

Missing review: 2-5 (new) and 13

Hi,

This series is inspired on Claudio TCG work.

Instead of separate TCG from other accelerators, here we separate sysemu operations (system VS user).

Since v6:
- Rebased (3 targets removed, Claudio's target/i386 series merged)
- Addressed Richard & David comments

Since v5:
- Rework patch 10 after Peter Maydell explanation on v3:
https://www.mail-archive.com/[email protected]/msg800849.html

Since v4:
- Removed watchpoint patches (need more work) (Richard)
- Merged patch 1 & 7 "Move CPUClass::vmsd to SysemuCPUOps" (Eduardo)
- Reworded cpu_virtio_is_big_endian description (Greg)
- Move write_elf() in target/riscv/cpu.c (rebased on top of 43a965888)
- Added R-b tags

Since v3:
- SysemuCPUOps const (Richard)
- added missing xtensa #ifdef'ry
- added missing aa64/sve #ifdef'ry
- added Laurent R-b

Since v2:
- fixed lm32/unicore32
- remove USER_ONLY ifdef'ry from "cpu.h" (Claudio)

Since v1:
- Name 'sysemu' (Claudio)
- change each field progressively (Richard)

$ git backport-diff
Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch
[down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respective=
ly

001/23:[down] 'NOTFORMERGE target/arm: Restrict MTE code to softmmu' 002/23:[down] 'cpu: Restrict target cpu_do_transaction_failed() handlers to s= ysemu'
003/23:[down] 'cpu: Restrict target cpu_do_unaligned_access() handlers to sys= emu'
004/23:[down] 'cpu: Remove duplicated 'sysemu/hw_accel.h' header' 005/23:[down] 'cpu: Split as cpu-common / cpu-sysemu' 006/23:[0002] [FC] 'cpu: Un-inline cpu_get_phys_page_debug and cpu_asidx_from= _attrs'
007/23:[0010] [FC] 'cpu: Introduce cpu_virtio_is_big_endian()' 008/23:[0088] [FC] 'cpu: Directly use cpu_write_elf*() fallback handlers in p= lace'
009/23:[0022] [FC] 'cpu: Directly use get_paging_enabled() fallback handlers = in place'
010/23:[0026] [FC] 'cpu: Directly use get_memory_mapping() fallback handlers = in place'
011/23:[0007] [FC] 'cpu: Assert DeviceClass::vmsd is NULL on user emulation' 012/23:[0004] [FC] 'cpu: Rename CPUClass vmsd -> legacy_vmsd' 013/23:[down] 'cpu: Move AVR target vmsd field from CPUClass to DeviceClass' 014/23:[0014] [FC] 'cpu: Introduce SysemuCPUOps structure' 015/23:[0003] [FC] 'cpu: Move CPUClass::vmsd to SysemuCPUOps' 016/23:[0002] [FC] 'cpu: Move CPUClass::virtio_is_big_endian to SysemuCPUOps' 017/23:[----] [--] 'cpu: Move CPUClass::get_crash_info to SysemuCPUOps' 018/23:[----] [-C] 'cpu: Move CPUClass::write_elf* to SysemuCPUOps' 019/23:[----] [--] 'cpu: Move CPUClass::asidx_from_attrs to SysemuCPUOps' 020/23:[0055] [FC] 'cpu: Move CPUClass::get_phys_page_debug to SysemuCPUOps' 021/23:[----] [--] 'cpu: Move CPUClass::get_memory_mapping to SysemuCPUOps' 022/23:[----] [--] 'cpu: Move CPUClass::get_paging_enabled to SysemuCPUOps' 023/23:[0012] [FC] 'cpu: Restrict "hw/core/sysemu-cpu-ops.h" to target/cpu.c'

Regards,

Phil.

Philippe Mathieu-Daud=C3=A9 (23):
NOTFORMERGE target/arm: Restrict MTE code to softmmu
cpu: Restrict target cpu_do_transaction_failed() handlers to sysemu
cpu: Restrict target cpu_do_unaligned_access() handlers to sysemu
cpu: Remove duplicated 'sysemu/hw_accel.h' header
cpu: Split as cpu-common / cpu-sysemu
cpu: Un-inline cpu_get_phys_page_debug and cpu_asidx_from_attrs
cpu: Introduce cpu_virtio_is_big_endian()
cpu: Directly use cpu_write_elf*() fallback handlers in place
cpu: Directly use get_paging_enabled() fallback handlers in place
cpu: Directly use get_memory_mapping() fallback handlers in place
cpu: Assert DeviceClass::vmsd is NULL on user emulation
cpu: Rename CPUClass vmsd -> legacy_vmsd
cpu: Move AVR target vmsd field from CPUClass to DeviceClass
cpu: Introduce SysemuCPUOps structure
cpu: Move CPUClass::vmsd to SysemuCPUOps
cpu: Move CPUClass::virtio_is_big_endian to SysemuCPUOps
cpu: Move CPUClass::get_crash_info to SysemuCPUOps
cpu: Move CPUClass::write_elf* to SysemuCPUOps
cpu: Move CPUClass::asidx_from_attrs to SysemuCPUOps
cpu: Move CPUClass::get_phys_page_debug to SysemuCPUOps
cpu: Move CPUClass::get_memory_mapping to SysemuCPUOps
cpu: Move CPUClass::get_paging_enabled to SysemuCPUOps
cpu: Restrict "hw/core/sysemu-cpu-ops.h" to target/cpu.c

 include/hw/core/cpu.h            |  92 +++++---------------
 include/hw/core/sysemu-cpu-ops.h |  92 ++++++++++++++++++++
 include/migration/vmstate.h      |   2 -
 target/alpha/cpu.h               |  12 ++-
 target/arm/cpu.h                 |   9 +-
 target/arm/internals.h           |   2 +
 target/avr/cpu.h                 |   1 +
 target/cris/cpu.h                |   7 +-
 target/hexagon/cpu.h             |   3 +
 target/hppa/cpu.h                |   5 +-
 target/i386/cpu.h                |   9 +-
 target/m68k/cpu.h                |  10 ++-
 target/microblaze/cpu.h          |  11 +--
 target/mips/cpu.h                |   3 +
 target/mips/tcg/tcg-internal.h   |   6 +-
 target/nios2/cpu.h               |   4 +-
 target/openrisc/cpu.h            |   6 +-
 target/ppc/cpu.h                 |   5 +-
 target/ppc/internal.h            |   2 +
 target/riscv/cpu.h               |  21 +++--
 target/rx/cpu.h                  |   5 ++
 target/s390x/cpu.h               |   3 +
 target/s390x/internal.h          |   2 +
 target/sh4/cpu.h                 |  11 ++-
 target/sparc/cpu.h               |  14 +--
 target/tricore/cpu.h             |   5 ++
 target/xtensa/cpu.h              |  19 ++--
 cpu.c                            |  18 ++--
 hw/core/{cpu.c =3D> cpu-common.c}  | 116 -------------------------
 hw/core/cpu-sysemu.c             | 145 +++++++++++++++++++++++++++++++
 hw/virtio/virtio.c               |   4 +-
 stubs/vmstate.c                  |   2 -
 target/alpha/cpu.c               |   8 +-
 target/arm/cpu.c                 |  18 ++--
 target/arm/tlb_helper.c          |   4 +-
 target/avr/cpu.c                 |   8 +-
 target/avr/machine.c             |   4 +-
 target/cris/cpu.c                |   8 +-
 target/hppa/cpu.c                |   8 +-
 target/i386/cpu.c                |  28 +++---
 target/m68k/cpu.c                |   8 +-
 target/microblaze/cpu.c          |   8 +-
 target/microblaze/helper.c       |  35 ++++----
 target/mips/cpu.c                |  10 ++-
 target/nios2/cpu.c               |   8 +-
 target/openrisc/cpu.c            |   8 +-
 target/ppc/excp_helper.c         |   3 +-
 target/riscv/cpu.c               |  14 ++-
 target/rx/cpu.c                  |  10 ++-
 target/s390x/cpu.c               |  14 ++-
 target/sh4/cpu.c                 |  11 ++-
 target/sparc/cpu.c               |  10 ++-
 target/sparc/ldst_helper.c       |   5 +-
 target/tricore/cpu.c             |   6 +-
 target/xtensa/cpu.c              |  10 ++-
 target/ppc/translate_init.c.inc  |  20 +++--
 hw/core/meson.build              |   3 +-
 target/arm/meson.build           |   6 +-
 58 files changed, 587 insertions(+), 334 deletions(-)
 create mode 100644 include/hw/core/sysemu-cpu-ops.h
 rename hw/core/{cpu.c =3D> cpu-common.c} (73%)
 create mode 100644 hw/core/cpu-sysemu.c

--=20
2.26.3