[PATCH 00/14] system/memory: Clean ups around address_space_ldst() endian variants

Philippe Mathieu-Daudé posted 14 patches 1 month, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20251217143150.94463-1-philmd@linaro.org
Maintainers: "Cédric Le Goater" <clg@kaod.org>, Peter Maydell <peter.maydell@linaro.org>, Steven Lee <steven_lee@aspeedtech.com>, Troy Lee <leetroy@gmail.com>, Jamin Lin <jamin_lin@aspeedtech.com>, Andrew Jeffery <andrew@codeconstruct.com.au>, Joel Stanley <joel@jms.id.au>, "Michael S. Tsirkin" <mst@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Peter Xu <peterx@redhat.com>, David Hildenbrand <david@kernel.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Zhao Liu <zhao1.liu@intel.com>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Artyom Tarasenko <atar4qemu@gmail.com>
There is a newer version of this series
MAINTAINERS                                  |   3 +
include/hw/virtio/virtio-access.h            |   1 +
include/qemu/bswap.h                         |  11 -
include/system/memory.h                      | 191 -------
include/system/memory_cached.h               | 207 ++++++++
target/i386/cpu.h                            |   1 -
include/exec/memory_ldst.h.inc               |  52 +-
include/exec/memory_ldst_phys.h.inc          | 111 +---
include/system/memory_ldst_endian.h.inc      |  33 ++
include/system/memory_ldst_phys_endian.h.inc |  57 ++
hw/arm/aspeed.c                              |   3 +-
hw/arm/boot.c                                |   6 +-
system/physmem.c                             |  87 +++-
target/i386/helper.c                         |  10 -
target/sparc/mmu_helper.c                    |   2 +-
system/memory_ldst.c.inc                     | 514 ++++---------------
system/memory_ldst_endian.c.inc              |  64 +++
17 files changed, 546 insertions(+), 807 deletions(-)
create mode 100644 include/system/memory_cached.h
create mode 100644 include/system/memory_ldst_endian.h.inc
create mode 100644 include/system/memory_ldst_phys_endian.h.inc
create mode 100644 system/memory_ldst_endian.c.inc
[PATCH 00/14] system/memory: Clean ups around address_space_ldst() endian variants
Posted by Philippe Mathieu-Daudé 1 month, 3 weeks ago
Hi,

This series is preliminary on unifying endianness for the
single binary. The goal is to have a clean API ready for
harder refactor.

First we remove the _notdirty() and leul_to_cpu() helpers,
then we prepare the subpage_ops[] MemoryRegionOps to handle
distinct endianness in the same binary, and finally we add
a pair of ldm()/stm() variants to directly infer the access
size and endianness from a MemOp argument.

(As a bonus we also moved MemoryRegionCache out of memory.h).

Please review,

Phil.

Philippe Mathieu-Daudé (14):
  target/i386: Remove x86_stl_phys_notdirty() leftover
  target/sparc: Update MMU page table using stl_phys()
  hw/arm: Update bootloader generated with '-kernel' using stl_phys()
  system/memory: Remove address_space_stl_notdirty and stl_phys_notdirty
  system/physmem: Inline and remove leul_to_cpu()
  system/physmem: Use explicit endianness in subpage_ops::read/write()
  system/memory: Split MemoryRegionCache API to 'memory_cached.h'
  system/memory: Inline address_space_stq_internal()
  system/memory: Define address_space_ldst[W] endian variants via
    template
  system/memory: Define address_space_ldst[L] endian variants via
    template
  system/memory: Define address_space_ldst[Q] endian variants via
    template
  system/memory: Factor address_space_ldst[M]_internal() helper out
  system/memory: Pass device_endian argument as MemOp bit
  system/memory: Sort methods in memory_ldst.c.inc file

 MAINTAINERS                                  |   3 +
 include/hw/virtio/virtio-access.h            |   1 +
 include/qemu/bswap.h                         |  11 -
 include/system/memory.h                      | 191 -------
 include/system/memory_cached.h               | 207 ++++++++
 target/i386/cpu.h                            |   1 -
 include/exec/memory_ldst.h.inc               |  52 +-
 include/exec/memory_ldst_phys.h.inc          | 111 +---
 include/system/memory_ldst_endian.h.inc      |  33 ++
 include/system/memory_ldst_phys_endian.h.inc |  57 ++
 hw/arm/aspeed.c                              |   3 +-
 hw/arm/boot.c                                |   6 +-
 system/physmem.c                             |  87 +++-
 target/i386/helper.c                         |  10 -
 target/sparc/mmu_helper.c                    |   2 +-
 system/memory_ldst.c.inc                     | 514 ++++---------------
 system/memory_ldst_endian.c.inc              |  64 +++
 17 files changed, 546 insertions(+), 807 deletions(-)
 create mode 100644 include/system/memory_cached.h
 create mode 100644 include/system/memory_ldst_endian.h.inc
 create mode 100644 include/system/memory_ldst_phys_endian.h.inc
 create mode 100644 system/memory_ldst_endian.c.inc

-- 
2.52.0