[PATCH v2 0/6] system: Clarify legacy physical_memory_read/write/map/unmap API

Philippe Mathieu-Daudé posted 6 patches 1 month, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260616020839.19104-1-philmd@oss.qualcomm.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Ani Sinha <anisinha@redhat.com>, "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@mailo.com>, Mauro Carvalho Chehab <mchehab+huawei@kernel.org>, "Michael S. Tsirkin" <mst@redhat.com>, Igor Mammedov <imammedo@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>, Palmer Dabbelt <palmer@dabbelt.com>, Alistair Francis <alistair.francis@wdc.com>, Weiwei Li <liwei1518@gmail.com>, Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, Chao Liu <chao.liu.zevorn@gmail.com>, Peter Maydell <peter.maydell@linaro.org>, "Hervé Poussineau" <hpoussin@reactos.org>, Aleksandar Rikalo <arikalo@gmail.com>, "Maciej S. Szmigiero" <maciej.szmigiero@oracle.com>, Richard Henderson <richard.henderson@linaro.org>, Glenn Miles <milesg@linux.ibm.com>, Gautam Menghani <gautam@linux.ibm.com>, Thomas Huth <th.huth+qemu@posteo.eu>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Bernhard Beschow <shentey@gmail.com>, Jason Wang <jasowang@redhat.com>, Max Filippov <jcmvbkbc@gmail.com>, Nicholas Piggin <npiggin@gmail.com>, Harsh Prateek Bora <harshpb@linux.ibm.com>, BALATON Zoltan <balaton@eik.bme.hu>, Aditya Gupta <adityag@linux.ibm.com>, Halil Pasic <pasic@linux.ibm.com>, Christian Borntraeger <borntraeger@linux.ibm.com>, Eric Farman <farman@linux.ibm.com>, Farhan Ali <alifm@linux.ibm.com>, Matthew Rosato <mjrosato@linux.ibm.com>, Cornelia Huck <cohuck@redhat.com>, Ilya Leoshkevich <iii@linux.ibm.com>, David Hildenbrand <david@kernel.org>, Jared Rossi <jrossi@linux.ibm.com>, Zhuoying Cai <zycai@linux.ibm.com>, Jason Herne <jjherne@linux.ibm.com>, Fam Zheng <fam@euphon.net>, Dmitry Fleytman <dmitry.fleytman@gmail.com>, Stefano Stabellini <sstabellini@kernel.org>, Anthony PERARD <anthony@xenproject.org>, Peter Xu <peterx@redhat.com>
docs/devel/loads-stores.rst            | 18 +++++-----
scripts/coccinelle/exec_rw_const.cocci | 16 ++++-----
hw/xtensa/bootparam.h                  |  6 ++--
include/exec/cpu-common.h              |  8 -----
include/system/physmem.h               | 50 ++++++++++++++++++++++++++
accel/kvm/kvm-all.c                    | 12 +++----
dump/dump.c                            |  3 +-
dump/win_dump-x86.c                    |  5 +--
gdbstub/system.c                       | 11 +++---
hw/acpi/ghes.c                         | 24 ++++++-------
hw/acpi/nvdimm.c                       | 13 +++----
hw/acpi/vmgenid.c                      |  3 +-
hw/audio/marvell_88w8618.c             |  3 +-
hw/char/riscv_htif.c                   |  5 +--
hw/display/exynos4210_fimd.c           |  7 ++--
hw/display/omap_lcdc.c                 |  5 +--
hw/display/ramfb.c                     |  7 ++--
hw/dma/i8257.c                         |  9 ++---
hw/dma/omap_dma.c                      |  6 ++--
hw/dma/rc4030.c                        |  3 +-
hw/dma/sifive_pdma.c                   |  9 ++---
hw/hyperv/hyperv.c                     | 25 ++++++-------
hw/hyperv/syndbg.c                     | 13 +++----
hw/hyperv/vmbus.c                      |  9 ++---
hw/i386/kvm/clock.c                    |  3 +-
hw/i386/vapic.c                        | 21 +++++------
hw/intc/apic.c                         |  3 +-
hw/intc/xive2.c                        |  3 +-
hw/m68k/next-cube.c                    |  3 +-
hw/microblaze/boot.c                   |  3 +-
hw/misc/pc-testdev.c                   |  5 +--
hw/net/fsl_etsec/rings.c               | 13 +++----
hw/net/mcf_fec.c                       | 11 +++---
hw/net/opencores_eth.c                 |  9 ++---
hw/nvram/spapr_nvram.c                 |  9 ++---
hw/ppc/amigaone.c                      |  5 +--
hw/ppc/e500.c                          |  3 +-
hw/ppc/pegasos.c                       | 11 +++---
hw/ppc/pnv.c                           |  5 +--
hw/ppc/ppc440_uc.c                     |  9 ++---
hw/ppc/spapr.c                         |  3 +-
hw/ppc/spapr_drc.c                     |  3 +-
hw/ppc/spapr_events.c                  |  9 ++---
hw/ppc/spapr_hcall.c                   | 17 ++++-----
hw/ppc/spapr_rtas.c                    |  5 +--
hw/ppc/spapr_tpm_proxy.c               |  5 +--
hw/ppc/virtex_ml507.c                  |  3 +-
hw/s390x/css.c                         |  5 +--
hw/s390x/ipl.c                         |  9 ++---
hw/s390x/s390-pci-bus.c                |  5 +--
hw/s390x/virtio-ccw.c                  |  5 +--
hw/scsi/vmw_pvscsi.c                   | 12 +++----
hw/xen/xen_pt_graphics.c               |  4 +--
hw/xtensa/xtfpga.c                     |  5 +--
system/cpus.c                          |  3 +-
system/physmem.c                       | 12 +++----
target/s390x/diag.c                    | 43 ++++++++++++----------
57 files changed, 310 insertions(+), 224 deletions(-)
[PATCH v2 0/6] system: Clarify legacy physical_memory_read/write/map/unmap API
Posted by Philippe Mathieu-Daudé 1 month, 1 week ago
Missing review: #2

It is not obvious the cpu_physical_memory_read/write/map/unmap()
methods do not involve vCPU at all and use the legacy global
address space. Document that, because this is an issue for some
board which doesn't use it at all. Rename the methods stripping
the 'cpu_' prefix.

Clean a pair of dubious uses out of hw/.

Based-on: <20260616020359.18627-1-philmd@oss.qualcomm.com>

Philippe Mathieu-Daudé (6):
  system: Document cpu_physical_memory_*() declarations
  accel/kvm: Replace legacy cpu_physical_memory_write() call
  gdbstub/system: Replace legacy cpu_physical_memory_read/write() calls
  target/s390x: Factor common s390_ipl_read/write() helpers
  target/s390x: Replace legacy cpu_physical_memory_read/write() calls
  system: Move cpu_physical_memory_*() declarations to
    'system/physmem.h'

 docs/devel/loads-stores.rst            | 18 +++++-----
 scripts/coccinelle/exec_rw_const.cocci | 16 ++++-----
 hw/xtensa/bootparam.h                  |  6 ++--
 include/exec/cpu-common.h              |  8 -----
 include/system/physmem.h               | 50 ++++++++++++++++++++++++++
 accel/kvm/kvm-all.c                    | 12 +++----
 dump/dump.c                            |  3 +-
 dump/win_dump-x86.c                    |  5 +--
 gdbstub/system.c                       | 11 +++---
 hw/acpi/ghes.c                         | 24 ++++++-------
 hw/acpi/nvdimm.c                       | 13 +++----
 hw/acpi/vmgenid.c                      |  3 +-
 hw/audio/marvell_88w8618.c             |  3 +-
 hw/char/riscv_htif.c                   |  5 +--
 hw/display/exynos4210_fimd.c           |  7 ++--
 hw/display/omap_lcdc.c                 |  5 +--
 hw/display/ramfb.c                     |  7 ++--
 hw/dma/i8257.c                         |  9 ++---
 hw/dma/omap_dma.c                      |  6 ++--
 hw/dma/rc4030.c                        |  3 +-
 hw/dma/sifive_pdma.c                   |  9 ++---
 hw/hyperv/hyperv.c                     | 25 ++++++-------
 hw/hyperv/syndbg.c                     | 13 +++----
 hw/hyperv/vmbus.c                      |  9 ++---
 hw/i386/kvm/clock.c                    |  3 +-
 hw/i386/vapic.c                        | 21 +++++------
 hw/intc/apic.c                         |  3 +-
 hw/intc/xive2.c                        |  3 +-
 hw/m68k/next-cube.c                    |  3 +-
 hw/microblaze/boot.c                   |  3 +-
 hw/misc/pc-testdev.c                   |  5 +--
 hw/net/fsl_etsec/rings.c               | 13 +++----
 hw/net/mcf_fec.c                       | 11 +++---
 hw/net/opencores_eth.c                 |  9 ++---
 hw/nvram/spapr_nvram.c                 |  9 ++---
 hw/ppc/amigaone.c                      |  5 +--
 hw/ppc/e500.c                          |  3 +-
 hw/ppc/pegasos.c                       | 11 +++---
 hw/ppc/pnv.c                           |  5 +--
 hw/ppc/ppc440_uc.c                     |  9 ++---
 hw/ppc/spapr.c                         |  3 +-
 hw/ppc/spapr_drc.c                     |  3 +-
 hw/ppc/spapr_events.c                  |  9 ++---
 hw/ppc/spapr_hcall.c                   | 17 ++++-----
 hw/ppc/spapr_rtas.c                    |  5 +--
 hw/ppc/spapr_tpm_proxy.c               |  5 +--
 hw/ppc/virtex_ml507.c                  |  3 +-
 hw/s390x/css.c                         |  5 +--
 hw/s390x/ipl.c                         |  9 ++---
 hw/s390x/s390-pci-bus.c                |  5 +--
 hw/s390x/virtio-ccw.c                  |  5 +--
 hw/scsi/vmw_pvscsi.c                   | 12 +++----
 hw/xen/xen_pt_graphics.c               |  4 +--
 hw/xtensa/xtfpga.c                     |  5 +--
 system/cpus.c                          |  3 +-
 system/physmem.c                       | 12 +++----
 target/s390x/diag.c                    | 43 ++++++++++++----------
 57 files changed, 310 insertions(+), 224 deletions(-)

-- 
2.53.0


Re: [PATCH v2 0/6] system: Clarify legacy physical_memory_read/write/map/unmap API
Posted by Philippe Mathieu-Daudé 1 month, 1 week ago
> Philippe Mathieu-Daudé (6):
>    system: Document cpu_physical_memory_*() declarations
>    accel/kvm: Replace legacy cpu_physical_memory_write() call
>    gdbstub/system: Replace legacy cpu_physical_memory_read/write() calls
>    target/s390x: Factor common s390_ipl_read/write() helpers
>    target/s390x: Replace legacy cpu_physical_memory_read/write() calls
>    system: Move cpu_physical_memory_*() declarations to
>      'system/physmem.h'

Queued, thanks.