[PATCH v5 0/7] single-binary: Drop TARGET_PHYS_ADDR_SPACE_BITS

Anton Johansson via qemu development posted 7 patches 1 month, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260216-phys._5Faddr-v5-0-29d522f1339c@rev.ng
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Helge Deller <deller@gmx.de>, Song Gao <gaosong@loongson.cn>, Bibo Mao <maobibo@loongson.cn>, Jiaxun Yang <jiaxun.yang@flygoat.com>, Palmer Dabbelt <palmer@dabbelt.com>, Alistair Francis <alistair.francis@wdc.com>, Weiwei Li <liwei1518@gmail.com>, Daniel Henrique Barboza <dbarboza@ventanamicro.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, Paolo Bonzini <pbonzini@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Peter Maydell <peter.maydell@linaro.org>, Michael Rolnik <mrolnik@gmail.com>, Brian Cain <brian.cain@oss.qualcomm.com>, Zhao Liu <zhao1.liu@intel.com>, Marcelo Tosatti <mtosatti@redhat.com>, Eduardo Habkost <eduardo@habkost.net>, Laurent Vivier <laurent@vivier.eu>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Aurelien Jarno <aurelien@aurel32.net>, Aleksandar Rikalo <arikalo@gmail.com>, Stafford Horne <shorne@gmail.com>, Nicholas Piggin <npiggin@gmail.com>, Chinmay Rath <rathc@linux.ibm.com>, Yoshinori Sato <yoshinori.sato@nifty.com>, Ilya Leoshkevich <iii@linux.ibm.com>, David Hildenbrand <david@kernel.org>, Thomas Huth <thuth@redhat.com>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Artyom Tarasenko <atar4qemu@gmail.com>, Bastian Koppelmann <kbastian@rumtueddeln.de>, Max Filippov <jcmvbkbc@gmail.com>
There is a newer version of this series
hw/riscv/riscv-iommu.h            |  1 +
include/exec/cpu-defs.h           |  3 ---
include/exec/poison.h             |  2 --
include/hw/loongarch/boot.h       |  3 ++-
target/alpha/cpu-param.h          |  3 ---
target/arm/cpu-param.h            |  2 --
target/avr/cpu-param.h            |  1 -
target/hexagon/cpu-param.h        |  1 -
target/hppa/cpu-param.h           |  3 ---
target/hppa/cpu.h                 |  1 +
target/i386/cpu-param.h           |  2 --
target/i386/tcg/helper-tcg.h      |  2 --
target/loongarch/cpu-mmu.h        |  1 +
target/loongarch/cpu-param.h      |  1 -
target/loongarch/internals.h      |  1 -
target/m68k/cpu-param.h           |  1 -
target/microblaze/cpu-param.h     |  2 --
target/mips/cpu-param.h           |  2 --
target/or1k/cpu-param.h           |  1 -
target/ppc/cpu-param.h            |  7 -------
target/riscv/cpu-param.h          |  2 --
target/rx/cpu-param.h             |  1 -
target/s390x/cpu-param.h          |  1 -
target/sh4/cpu-param.h            |  1 -
target/sparc/cpu-param.h          |  2 --
target/tricore/cpu-param.h        |  1 -
target/xtensa/cpu-param.h         |  1 -
hw/hppa/machine.c                 |  2 +-
hw/loongarch/boot.c               | 28 ++++++++++++++++------------
hw/loongarch/virt.c               |  5 ++++-
hw/riscv/riscv-iommu-pci.c        |  3 +++
hw/riscv/riscv-iommu.c            |  8 ++++----
hw/riscv/virt.c                   |  7 +++++++
target/hppa/mem_helper.c          | 32 +++++++++++++++++++++++++++-----
target/i386/cpu.c                 |  9 +++------
target/i386/kvm/kvm.c             |  3 +--
target/loongarch/cpu_helper.c     | 15 ++++++++++++---
target/loongarch/tcg/tlb_helper.c | 12 ++++++++----
38 files changed, 91 insertions(+), 82 deletions(-)
[PATCH v5 0/7] single-binary: Drop TARGET_PHYS_ADDR_SPACE_BITS
Posted by Anton Johansson via qemu development 1 month, 1 week ago
The target macro TARGET_PHYS_ADDR_SPACE_BITS is unused since commit

  2e8fe327eb6 ("accel/tcg: Simplify L1_MAP_ADDR_SPACE_BITS"),

replace the handful of remaining uses with runtime functions or
constants.

For discussion see:

  https://lore.kernel.org/qemu-devel/8f0db5c1-f20b-4b7a-8d6c-76ce7ec7b4e0@linaro.org/

Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Anton Johansson <anjo@rev.ng>
---
Changes in v5:
- Added RISCVIOMMUState::pas_bits property (Richard, Chao);
- Dropped already merged alpha patch (Philippe);
- Added reviewed-bys;
- Link to v4: https://lore.kernel.org/qemu-devel/20260210-phys_addr-v4-0-725a589e83c8@rev.ng

Changes in v4:
- Revert to using 40 bit physical addresses for HPPA to not break SeaBIOS
  functional tests. This will be addressed in a separate series;
- Added HPPA patch 3/8 to convert a missed 32-bit abs -> physical
  address conversion;
- Link to v3: https://lore.kernel.org/qemu-devel/20260112-phys_addr-v3-0-5f90fdb4015f@rev.ng

Changes in v3:
- Added reviewed-by;
- Widened CC;
- Link to v2: https://lore.kernel.org/qemu-devel/20251215-phys_addr-v2-0-633aa1d922cd@rev.ng

Changes in v2:
- Move alpha_phys_addr_space_bits() to linux-user/alpha/target_proc.h
  (Richard);
- Link to v1: https://lore.kernel.org/qemu-devel/20251209-phys_addr-v1-0-c387f3e72d77@rev.ng

---
Anton Johansson (7):
      target/hppa: Define PA[20|1X] physical address space size
      hw/hppa: Use hppa_abs_to_phys_pa1x()
      target/i386: Drop physical address range checks
      target/loongarch: Introduce loongarch_palen_mask()
      hw/loongarch: Use loongarch_palen_mask()
      hw/riscv: Set IOMMU PAS via property
      Drop TARGET_PHYS_ADDR_SPACE_BITS

 hw/riscv/riscv-iommu.h            |  1 +
 include/exec/cpu-defs.h           |  3 ---
 include/exec/poison.h             |  2 --
 include/hw/loongarch/boot.h       |  3 ++-
 target/alpha/cpu-param.h          |  3 ---
 target/arm/cpu-param.h            |  2 --
 target/avr/cpu-param.h            |  1 -
 target/hexagon/cpu-param.h        |  1 -
 target/hppa/cpu-param.h           |  3 ---
 target/hppa/cpu.h                 |  1 +
 target/i386/cpu-param.h           |  2 --
 target/i386/tcg/helper-tcg.h      |  2 --
 target/loongarch/cpu-mmu.h        |  1 +
 target/loongarch/cpu-param.h      |  1 -
 target/loongarch/internals.h      |  1 -
 target/m68k/cpu-param.h           |  1 -
 target/microblaze/cpu-param.h     |  2 --
 target/mips/cpu-param.h           |  2 --
 target/or1k/cpu-param.h           |  1 -
 target/ppc/cpu-param.h            |  7 -------
 target/riscv/cpu-param.h          |  2 --
 target/rx/cpu-param.h             |  1 -
 target/s390x/cpu-param.h          |  1 -
 target/sh4/cpu-param.h            |  1 -
 target/sparc/cpu-param.h          |  2 --
 target/tricore/cpu-param.h        |  1 -
 target/xtensa/cpu-param.h         |  1 -
 hw/hppa/machine.c                 |  2 +-
 hw/loongarch/boot.c               | 28 ++++++++++++++++------------
 hw/loongarch/virt.c               |  5 ++++-
 hw/riscv/riscv-iommu-pci.c        |  3 +++
 hw/riscv/riscv-iommu.c            |  8 ++++----
 hw/riscv/virt.c                   |  7 +++++++
 target/hppa/mem_helper.c          | 32 +++++++++++++++++++++++++++-----
 target/i386/cpu.c                 |  9 +++------
 target/i386/kvm/kvm.c             |  3 +--
 target/loongarch/cpu_helper.c     | 15 ++++++++++++---
 target/loongarch/tcg/tlb_helper.c | 12 ++++++++----
 38 files changed, 91 insertions(+), 82 deletions(-)