qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/24] exec: Build up 'cputlb.h' and 'ram_addr.h' headers
@ 2024-11-14  1:12 Philippe Mathieu-Daudé
  2024-11-14  1:12 ` [PATCH 01/24] exec/cpu-all: Include missing 'exec/cpu-defs.h' header Philippe Mathieu-Daudé
                   ` (23 more replies)
  0 siblings, 24 replies; 78+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-11-14  1:12 UTC (permalink / raw)
  To: Paolo Bonzini, Richard Henderson, Anton Johansson, qemu-devel
  Cc: qemu-ppc, Thomas Huth, qemu-arm, Peter Xu, Pierrick Bouvier,
	qemu-riscv, David Hildenbrand, Peter Maydell, Alex Bennée,
	qemu-s390x, Philippe Mathieu-Daudé

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

-- 
2.45.2



^ permalink raw reply	[flat|nested] 78+ messages in thread

end of thread, other threads:[~2024-11-14 21:14 UTC | newest]

Thread overview: 78+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-14  1:12 [PATCH 00/24] exec: Build up 'cputlb.h' and 'ram_addr.h' headers Philippe Mathieu-Daudé
2024-11-14  1:12 ` [PATCH 01/24] exec/cpu-all: Include missing 'exec/cpu-defs.h' header Philippe Mathieu-Daudé
2024-11-14  4:09   ` Pierrick Bouvier
2024-11-14  8:29   ` Thomas Huth
2024-11-14 18:11     ` Richard Henderson
2024-11-14  1:12 ` [PATCH 02/24] exec/cpu-defs: Remove unnecessary headers Philippe Mathieu-Daudé
2024-11-14  4:09   ` Pierrick Bouvier
2024-11-14  8:33   ` Thomas Huth
2024-11-14 18:15   ` Richard Henderson
2024-11-14  1:12 ` [PATCH 03/24] exec/translation-block: Include missing 'exec/vaddr.h' header Philippe Mathieu-Daudé
2024-11-14  4:10   ` Pierrick Bouvier
2024-11-14 15:23     ` Philippe Mathieu-Daudé
2024-11-14 17:13       ` Pierrick Bouvier
2024-11-14 18:15   ` Richard Henderson
2024-11-14  1:12 ` [PATCH 04/24] accel/tcg: Include missing 'exec/translation-block.h' header Philippe Mathieu-Daudé
2024-11-14  4:11   ` Pierrick Bouvier
2024-11-14 18:23   ` Richard Henderson
2024-11-14  1:12 ` [PATCH 05/24] target/i386/helper: " Philippe Mathieu-Daudé
2024-11-14  4:11   ` Pierrick Bouvier
2024-11-14 18:42   ` Richard Henderson
2024-11-14  1:12 ` [PATCH 06/24] target/rx/cpu: " Philippe Mathieu-Daudé
2024-11-14  4:11   ` Pierrick Bouvier
2024-11-14 18:43   ` Richard Henderson
2024-11-14  1:12 ` [PATCH 07/24] system/watchpoint: Include missing 'exec/cpu-all.h' header Philippe Mathieu-Daudé
2024-11-14  4:11   ` Pierrick Bouvier
2024-11-14 18:53   ` Richard Henderson
2024-11-14  1:12 ` [PATCH 08/24] linux-user/aarch64/mte: Include missing 'user/abitypes.h' header Philippe Mathieu-Daudé
2024-11-14  4:11   ` Pierrick Bouvier
2024-11-14 18:59   ` Richard Henderson
2024-11-14  1:12 ` [PATCH 09/24] target/arm/mte: Restrict 'exec/ram_addr.h' to system emulation Philippe Mathieu-Daudé
2024-11-14  4:11   ` Pierrick Bouvier
2024-11-14 19:00   ` Richard Henderson
2024-11-14  1:12 ` [PATCH 10/24] target/arm/cpu: Restrict cpu_untagged_addr() to user emulation Philippe Mathieu-Daudé
2024-11-14  4:12   ` Pierrick Bouvier
2024-11-14 19:03   ` Richard Henderson
2024-11-14  1:12 ` [PATCH 11/24] exec: Introduce 'user/guest-host.h' header Philippe Mathieu-Daudé
2024-11-14  4:12   ` Pierrick Bouvier
2024-11-14 19:14   ` Richard Henderson
2024-11-14  1:12 ` [PATCH 12/24] accel/tcg: Have tlb_vaddr_to_host() use vaddr type Philippe Mathieu-Daudé
2024-11-14  4:12   ` Pierrick Bouvier
2024-11-14 19:16   ` Richard Henderson
2024-11-14  1:12 ` [PATCH 13/24] exec: Declare tlb_reset_dirty*() in 'exec/cputlb.h' Philippe Mathieu-Daudé
2024-11-14  4:12   ` Pierrick Bouvier
2024-11-14 19:19   ` Richard Henderson
2024-11-14 21:05     ` Philippe Mathieu-Daudé
2024-11-14  1:12 ` [PATCH 14/24] exec: Declare tlb_init/destroy() " Philippe Mathieu-Daudé
2024-11-14  4:13   ` Pierrick Bouvier
2024-11-14 19:21   ` Richard Henderson
2024-11-14 21:13     ` Philippe Mathieu-Daudé
2024-11-14  1:13 ` [PATCH 15/24] exec: Declare tlb_set_page_full() " Philippe Mathieu-Daudé
2024-11-14  4:13   ` Pierrick Bouvier
2024-11-14 19:24   ` Richard Henderson
2024-11-14  1:13 ` [PATCH 16/24] exec: Declare tlb_set_page_with_attrs() " Philippe Mathieu-Daudé
2024-11-14  4:13   ` Pierrick Bouvier
2024-11-14  1:13 ` [PATCH 17/24] exec: Declare tlb_set_page() " Philippe Mathieu-Daudé
2024-11-14  4:13   ` Pierrick Bouvier
2024-11-14  1:13 ` [PATCH 18/24] exec: Declare tlb_flush*() " Philippe Mathieu-Daudé
2024-11-14  4:14   ` Pierrick Bouvier
2024-11-14 19:30   ` Richard Henderson
2024-11-14  1:13 ` [PATCH 19/24] exec: Declare tlb_hit*() " Philippe Mathieu-Daudé
2024-11-14  4:14   ` Pierrick Bouvier
2024-11-14 19:37   ` Richard Henderson
2024-11-14  1:13 ` [PATCH 20/24] exec: Declare tlb_vaddr_to_host() " Philippe Mathieu-Daudé
2024-11-14  4:14   ` Pierrick Bouvier
2024-11-14 19:59   ` Richard Henderson
2024-11-14  1:13 ` [PATCH 21/24] exec: Extract CPU physical memory API to 'sysemu/physmem-target.h' Philippe Mathieu-Daudé
2024-11-14  1:17   ` Philippe Mathieu-Daudé
2024-11-14  4:15   ` Pierrick Bouvier
2024-11-14 20:51   ` Richard Henderson
2024-11-14  1:13 ` [PATCH 22/24] exec/cpu-common: Move ram_addr_t related methods to 'exec/ram_addr.h' Philippe Mathieu-Daudé
2024-11-14  4:15   ` Pierrick Bouvier
2024-11-14 20:47   ` Richard Henderson
2024-11-14  1:13 ` [PATCH 23/24] exec/memory: Move qemu_map_ram_ptr() declaration " Philippe Mathieu-Daudé
2024-11-14  4:16   ` Pierrick Bouvier
2024-11-14 20:48   ` Richard Henderson
2024-11-14  1:13 ` [PATCH 24/24] exec: Move 'ram_addr.h' header under sysemu/ namespace Philippe Mathieu-Daudé
2024-11-14  4:16   ` Pierrick Bouvier
2024-11-14 20:49   ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).