Skip to content

exec: Build up 'cputlb.h' and 'ram_addr.h' headers

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 Latest24 patches 53 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/24exec/cpu-all: Include missing 'exec/cpu-defs.h' headerinclude/exec/cpu-all.h+1 -13 replies
2/24exec/cpu-defs: Remove unnecessary headersinclude/exec/cpu-defs.h+0 -83 replies
3/24exec/translation-block: Include missing 'exec/vaddr.h' headerinclude/exec/translation-block.h+1 -04 replies
4/24accel/tcg: Include missing 'exec/translation-block.h' headeraccel/tcg/tcg-accel-ops.c+1 -02 replies
5/24target/i386/helper: Include missing 'exec/translation-block.h' headertarget/i386/helper.c+1 -02 replies
6/24target/rx/cpu: Include missing 'exec/translation-block.h' headertarget/rx/cpu.c+1 -02 replies
7/24system/watchpoint: Include missing 'exec/cpu-all.h' headersystem/watchpoint.c+1 -02 replies
8/24linux-user/aarch64/mte: Include missing 'user/abitypes.h' headerlinux-user/aarch64/mte_user_helper.h+2 -02 replies
9/24target/arm/mte: Restrict 'exec/ram_addr.h' to system emulationtarget/arm/tcg/mte_helper.c+2 -02 replies
10/24target/arm/cpu: Restrict cpu_untagged_addr() to user emulationtarget/arm/cpu.h+3 -22 replies
11/24exec: Introduce 'user/guest-host.h' headerinclude/exec/cpu-all.h include/exec/cpu_ldst.h include/user/guest-host.h+89 -792 replies
12/24accel/tcg: Have tlb_vaddr_to_host() use vaddr typeaccel/tcg/cputlb.c include/exec/cpu_ldst.h+3 -22 replies
13/24exec: Declare tlb_reset_dirty*() in 'exec/cputlb.h'include/exec/cputlb.h include/exec/exec-all.h include/exec/ram_addr.h +1 more+9 -33 replies
14/24exec: Declare tlb_init/destroy() in 'exec/cputlb.h'accel/tcg/cpu-exec.c include/exec/cputlb.h include/exec/exec-all.h+24 -223 replies
15/24exec: Declare tlb_set_page_full() in 'exec/cputlb.h'include/exec/cputlb.h include/exec/exec-all.h target/sparc/mmu_helper.c+24 -232 replies
16/24exec: Declare tlb_set_page_with_attrs() in 'exec/cputlb.h'include/exec/cputlb.h include/exec/exec-all.h target/i386/tcg/sysemu/excp_helper.c +1 more+30 -271 reply
17/24exec: Declare tlb_set_page() in 'exec/cputlb.h'include/exec/cputlb.h include/exec/exec-all.h+11 -91 reply
18/24exec: Declare tlb_flush*() in 'exec/cputlb.h'accel/tcg/tcg-accel-ops.c cpu-target.c hw/intc/armv7m_nvic.c +43 more+231 -2102 replies
19/24exec: Declare tlb_hit*() in 'exec/cputlb.h'accel/tcg/cputlb.c include/exec/cpu-all.h+23 -232 replies
20/24exec: Declare tlb_vaddr_to_host() in 'exec/cputlb.h'include/exec/cpu_ldst.h include/exec/cputlb.h target/arm/tcg/helper-a64.c +1 more+28 -252 replies
21/24exec: Extract CPU physical memory API to 'sysemu/physmem-target.h'MAINTAINERS accel/kvm/kvm-all.c accel/tcg/cputlb.c +24 more+532 -4823 replies
22/24exec/cpu-common: Move ram_addr_t related methods to 'exec/ram_addr.h'include/exec/cpu-common.h include/exec/ram_addr.h include/exec/translation-block.h+58 -562 replies
23/24exec/memory: Move qemu_map_ram_ptr() declaration to 'exec/ram_addr.h'include/exec/memory.h include/exec/ram_addr.h+2 -12 replies
24/24exec: Move 'ram_addr.h' header under sysemu/ namespaceMAINTAINERS accel/kvm/kvm-all.c accel/tcg/cputlb.c +27 more+29 -292 replies

Reviews trailers per patch

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

PatchPierrick BouvierThomas HuthRichard Henderson
1/24R-b R-b
2/24R-b T-b R-b
3/24R-b R-b
4/24R-b R-b
5/24R-b R-b
6/24R-b R-b
7/24R-b
8/24R-b
9/24R-b R-b
10/24R-b R-b
11/24R-b R-b
12/24R-b R-b
13/24R-b
14/24R-b
15/24R-b
16/24R-b
17/24R-b
18/24R-b R-b
19/24R-b
20/24R-b
21/24R-b
22/24R-b R-b
23/24R-b R-b
24/24R-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 3 reviewers.

Read the v1 thread

Cover letter [PATCH 00/24] exec: Build up 'cputlb.h' and 'ram_addr.h' headers

Hi,

"exec/exec-all.h" and "exec/cpu-all.h" both contains a mess of unrelated APIs. More importantly, they contain target specific declarations, making any file including them to become target specific, thus not buildable in common meson sets.

This series first extract the CPU TLB API scattered in various headers, then similarly strengthen the ram_addr_t API. Doing so we figured extracting "user/guest-host.h" was necessary.

Before we have to include various missing headers to avoid compilation breakage when refactoring.

The relevant part of the diff-stat is:

 include/exec/cpu-all.h        |  59 +-------------------
 include/exec/cpu-common.h     |  56 +------------------
 include/exec/cpu_ldst.h       |  73 +------------------------
 include/exec/exec-all.h       | 259 ------------------------------------------
 include/exec/ram_addr.h       | 56 ++-----------------
 include/sysemu/ram_addr.h     | 129 ++++++++++++++++++++++++++++++++++++++
 include/exec/cputlb.h         | 310 ++++++++++++++++++++++++++++++++++++++++++
 include/user/guest-host.h     |  87 +++++++++++++++++++++++++++++

Hoping it makes sense!

Please review,

Phil.

Philippe Mathieu-Daudé (24):
exec/cpu-all: Include missing 'exec/cpu-defs.h' header exec/cpu-defs: Remove unnecessary headers exec/translation-block: Include missing 'exec/vaddr.h' header accel/tcg: Include missing 'exec/translation-block.h' header target/i386/helper: Include missing 'exec/translation-block.h' header target/rx/cpu: Include missing 'exec/translation-block.h' header system/watchpoint: Include missing 'exec/cpu-all.h' header linux-user/aarch64/mte: Include missing 'user/abitypes.h' header target/arm/mte: Restrict 'exec/ram_addr.h' to system emulation target/arm/cpu: Restrict cpu_untagged_addr() to user emulation
exec: Introduce 'user/guest-host.h' header
accel/tcg: Have tlb_vaddr_to_host() use vaddr type
exec: Declare tlb_reset_dirty*() in 'exec/cputlb.h'
exec: Declare tlb_init/destroy() in 'exec/cputlb.h'
exec: Declare tlb_set_page_full() in 'exec/cputlb.h'
exec: Declare tlb_set_page_with_attrs() in 'exec/cputlb.h'
exec: Declare tlb_set_page() in 'exec/cputlb.h'
exec: Declare tlb_flush*() in 'exec/cputlb.h'
exec: Declare tlb_hit*() in 'exec/cputlb.h'
exec: Declare tlb_vaddr_to_host() in 'exec/cputlb.h'
exec: Extract CPU physical memory API to 'sysemu/physmem-target.h' exec/cpu-common: Move ram_addr_t related methods to 'exec/ram_addr.h' exec/memory: Move qemu_map_ram_ptr() declaration to 'exec/ram_addr.h'
exec: Move 'ram_addr.h' header under sysemu/ namespace

 MAINTAINERS                                   |   3 +-
 include/exec/cpu-all.h                        |  59 +---
 include/exec/cpu-common.h                     |  56 +---
 include/exec/cpu-defs.h                       |   8 -
 include/exec/cpu_ldst.h                       |  73 +----
 include/exec/cputlb.h                         | 310 +++++++++++++++++-
 include/exec/exec-all.h                       | 259 ---------------
 include/exec/memory.h                         |   2 +-
 include/exec/translation-block.h              |   3 +-
 .../ram_addr.h => sysemu/physmem-target.h}    |  56 +---
 include/sysemu/ram_addr.h                     | 129 ++++++++
 include/user/guest-host.h                     |  87 +++++
 linux-user/aarch64/mte_user_helper.h          |   2 +
 target/arm/cpu.h                              |   5 +-
 accel/kvm/kvm-all.c                           |   3 +-
 accel/tcg/cpu-exec.c                          |   1 +
 accel/tcg/cputlb.c                            |  28 +-
 accel/tcg/tcg-accel-ops.c                     |   2 +
 accel/tcg/translate-all.c                     |   3 +-
 cpu-target.c                                  |   1 +
 hw/intc/armv7m_nvic.c                         |   2 +-
 hw/ppc/spapr.c                                |   3 +-
 hw/ppc/spapr_caps.c                           |   3 +-
 hw/ppc/spapr_nested.c                         |   1 +
 hw/ppc/spapr_pci.c                            |   3 +-
 hw/remote/memory.c                            |   3 +-
 hw/remote/proxy-memory-listener.c             |   3 +-
 hw/s390x/s390-stattrib-kvm.c                  |   3 +-
 hw/s390x/s390-stattrib.c                      |   3 +-
 hw/s390x/s390-virtio-ccw.c                    |   3 +-
 hw/sh4/sh7750.c                               |   1 +
 hw/vfio/common.c                              |   3 +-
 hw/vfio/container.c                           |   3 +-
 hw/vfio/iommufd.c                             |   3 +-
 hw/vfio/migration.c                           |   3 +-
 hw/vfio/spapr.c                               |   3 +-
 hw/virtio/virtio-mem.c                        |   3 +-
 migration/ram.c                               |   3 +-
 plugins/api.c                                 |   3 +-
 system/memory.c                               |   3 +-
 system/physmem.c                              |   4 +-
 system/watchpoint.c                           |   3 +-
 target/alpha/helper.c                         |   2 +-
 target/alpha/sys_helper.c                     |   2 +-
 target/arm/helper.c                           |   1 +
 target/arm/tcg/helper-a64.c                   |   1 +
 target/arm/tcg/mte_helper.c                   |   5 +-
 target/avr/helper.c                           |   2 +-
 target/hppa/mem_helper.c                      |   1 +
 target/i386/helper.c                          |   2 +
 target/i386/machine.c                         |   2 +-
 target/i386/tcg/fpu_helper.c                  |   2 +-
 target/i386/tcg/misc_helper.c                 |   2 +-
 target/i386/tcg/sysemu/excp_helper.c          |   2 +-
 target/i386/tcg/sysemu/misc_helper.c          |   2 +-
 target/i386/tcg/sysemu/svm_helper.c           |   2 +-
 target/loongarch/tcg/csr_helper.c             |   2 +-
 target/loongarch/tcg/tlb_helper.c             |   2 +-
 target/m68k/helper.c                          |   2 +-
 target/microblaze/helper.c                    |   2 +-
 target/microblaze/mmu.c                       |   2 +-
 target/mips/sysemu/cp0.c                      |   2 +-
 target/mips/tcg/sysemu/cp0_helper.c           |   2 +-
 target/mips/tcg/sysemu/tlb_helper.c           |   2 +-
 target/openrisc/mmu.c                         |   2 +-
 target/openrisc/sys_helper.c                  |   1 +
 target/ppc/helper_regs.c                      |   2 +-
 target/ppc/kvm.c                              |   3 +-
 target/ppc/mem_helper.c                       |   1 +
 target/ppc/misc_helper.c                      |   1 +
 target/ppc/mmu_helper.c                       |   1 +
 target/riscv/cpu_helper.c                     |   2 +-
 target/riscv/csr.c                            |   1 +
 target/riscv/op_helper.c                      |   1 +
 target/riscv/pmp.c                            |   2 +-
 target/rx/cpu.c                               |   3 +-
 target/s390x/gdbstub.c                        |   2 +-
 target/s390x/kvm/kvm.c                        |   3 +-
 target/s390x/sigp.c                           |   2 +-
 target/s390x/tcg/excp_helper.c                |   1 +
 target/s390x/tcg/mem_helper.c                 |   1 +
 target/s390x/tcg/misc_helper.c                |   1 +
 target/sh4/helper.c                           |   2 +-
 target/sparc/ldst_helper.c                    |   1 +
 target/sparc/mmu_helper.c                     |   2 +-
 target/tricore/helper.c                       |   2 +-
 target/xtensa/helper.c                        |   2 +-
 target/xtensa/mmu_helper.c                    |   1 +
 88 files changed, 670 insertions(+), 566 deletions(-)
 rename include/{exec/ram_addr.h => sysemu/physmem-target.h} (88%)
 create mode 100644 include/sysemu/ram_addr.h
 create mode 100644 include/user/guest-host.h
Signature · 1 line
2.45.2