Skip to content

system/memory: Mark ld/st_phys() API as legacy

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

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9target/i386: Remove x86_stl_phys_notdirty() leftovertarget/i386/cpu.h target/i386/helper.c+0 -110 replies
2/9target/sparc: Update MMU page table using stl_phys()target/sparc/mmu_helper.c+1 -10 replies
3/9hw/arm: Avoid address_space_stl_notdirty() when generating bootloaderhw/arm/aspeed.c hw/arm/boot.c+6 -60 replies
4/9system/memory: Remove address_space_stl_notdirty and stl_phys_notdirtyinclude/exec/memory_ldst.h.inc include/system/memory.h system/memory_ldst.c.inc+0 -470 replies
5/9system/memory: Allow restricting legacy ldst_phys() API usageinclude/system/memory.h scripts/make-config-poison.sh+3 -03 replies
6/9configs/targets: Mark targets not using legacy ldst_phys() APIconfigs/targets/avr-softmmu.mak configs/targets/microblaze-softmmu.mak configs/targets/microblazeel-softmmu.mak +2 more+5 -02 replies
7/9hw/virtio: Remove unused ldst_phys() helpersinclude/hw/virtio/virtio-access.h+0 -852 replies
8/9hw/virtio: Reduce virtio_lduw/stw_phys_cached() scopehw/virtio/virtio.c include/hw/virtio/virtio-access.h+21 -212 replies
9/9configs/targets: Mark targets not using legacy ldst_phys() APIconfigs/targets/mips-softmmu.mak configs/targets/mips64-softmmu.mak configs/targets/mips64el-softmmu.mak +9 more+12 -02 replies

Reviews trailers per patch

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

PatchPierrick BouvierRichard HendersonZhao LiuManos Pitsidianakis
1/9R-b R-b R-b
2/9R-b R-b
3/9R-b R-b
4/9R-b R-b
5/9R-b R-b
6/9R-b R-b
7/9R-b R-b
8/9R-b R-b
9/9R-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 4 reviewers.

Read the v1 thread

Cover letter [PATCH 0/9] system/memory: Mark ld/st_phys() API as legacy

When using the ld/st_phys() API, when an access fail, no error is reported. Because if that we introduced the address_space_ld/st() API 10 years ago. There are few uses of the ld/st_phys() API left in the code base, time to mark it as legacy.
Allow targets to opt-out for the legacy API, by setting the TARGET_NOT_USING_LEGACY_LDST_PHYS_API definition.

First drop the _notdirty() variant, mark some targets clean of the legacy API, then rework virtio core layer a bit in order to clean more targets.

Targets left missing conversion:

 $ fgrep -L TARGET_NOT_USING_LEGACY_LDST_PHYS_API configs/targets/*softmmu*mak
 configs/targets/aarch64-softmmu.mak
 configs/targets/alpha-softmmu.mak
 configs/targets/arm-softmmu.mak
 configs/targets/hppa-softmmu.mak
 configs/targets/i386-softmmu.mak
 configs/targets/loongarch64-softmmu.mak
 configs/targets/m68k-softmmu.mak
 configs/targets/ppc-softmmu.mak
 configs/targets/ppc64-softmmu.mak
 configs/targets/s390x-softmmu.mak
 configs/targets/sparc-softmmu.mak
 configs/targets/x86_64-softmmu.mak

tag: https://gitlab.com/philmd/qemu/-/tags/legacy_ldst_phys-v1
CI: https://gitlab.com/philmd/qemu/-/pipelines/2231223066

Philippe Mathieu-Daudé (9):
target/i386: Remove x86_stl_phys_notdirty() leftover target/sparc: Update MMU page table using stl_phys() hw/arm: Avoid address_space_stl_notdirty() when generating bootloader system/memory: Remove address_space_stl_notdirty and stl_phys_notdirty system/memory: Allow restricting legacy ldst_phys() API usage configs/targets: Mark targets not using legacy ldst_phys() API hw/virtio: Remove unused ldst_phys() helpers
hw/virtio: Reduce virtio_lduw/stw_phys_cached() scope configs/targets: Mark targets not using legacy ldst_phys() API

 configs/targets/avr-softmmu.mak          |   1 +
 configs/targets/microblaze-softmmu.mak   |   1 +
 configs/targets/microblazeel-softmmu.mak |   1 +
 configs/targets/mips-softmmu.mak         |   1 +
 configs/targets/mips64-softmmu.mak       |   1 +
 configs/targets/mips64el-softmmu.mak     |   1 +
 configs/targets/mipsel-softmmu.mak       |   1 +
 configs/targets/or1k-softmmu.mak         |   1 +
 configs/targets/riscv32-softmmu.mak      |   1 +
 configs/targets/riscv64-softmmu.mak      |   1 +
 configs/targets/rx-softmmu.mak           |   1 +
 configs/targets/sh4-softmmu.mak          |   1 +
 configs/targets/sh4eb-softmmu.mak        |   1 +
 configs/targets/sparc64-softmmu.mak      |   1 +
 configs/targets/tricore-softmmu.mak      |   1 +
 configs/targets/xtensa-softmmu.mak       |   1 +
 configs/targets/xtensaeb-softmmu.mak     |   1 +
 include/hw/virtio/virtio-access.h        | 106 -----------------------
 include/system/memory.h                  |   8 +-
 target/i386/cpu.h                        |   1 -
 include/exec/memory_ldst.h.inc           |   2 -
 hw/arm/aspeed.c                          |   4 +-
 hw/arm/boot.c                            |   8 +-
 hw/virtio/virtio.c                       |  21 +++++
 target/i386/helper.c                     |  10 ---
 target/sparc/mmu_helper.c                |   2 +-
 system/memory_ldst.c.inc                 |  39 ---------
 scripts/make-config-poison.sh            |   1 +
 28 files changed, 48 insertions(+), 171 deletions(-)
Signature · 1 line
2.52.0