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(-)

-- 
2.52.0


Reply via email to