[PATCH v2 0/6] system/memory: Constify various AddressSpace/MemoryRegionCache arguments

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/20260616020359.18627-1-philmd@oss.qualcomm.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Peter Xu <peterx@redhat.com>, "Philippe Mathieu-Daudé" <philmd@mailo.com>
include/system/memory.h                 | 18 +++++++++-------
include/system/memory_cached.h          | 20 +++++++++---------
include/system/memory_ldst_cached.h.inc | 15 +++++++------
system/memory.c                         | 16 +++++++-------
system/physmem.c                        | 28 +++++++++++++------------
5 files changed, 53 insertions(+), 44 deletions(-)
[PATCH v2 0/6] system/memory: Constify various AddressSpace/MemoryRegionCache arguments
Posted by Philippe Mathieu-Daudé 1 month, 1 week ago
When structures are only accessed read-only, it is safer to mark
them const to protect against invalid API (ab)uses. This is also
an useful hint to compilers.

v2: Remove 'xlat' patch (Peter)

Philippe Mathieu-Daudé (6):
  system/memory: Constify various AddressSpace arguments (checks)
  system/memory: Constify various AddressSpace arguments (flat-range)
  system/memory: Constify various AddressSpace arguments (notify)
  system/memory: Constify various AddressSpace arguments (cache)
  system/memory: Constify various AddressSpace arguments (access)
  system/memory: Constify various MemoryRegionCache arguments

 include/system/memory.h                 | 18 +++++++++-------
 include/system/memory_cached.h          | 20 +++++++++---------
 include/system/memory_ldst_cached.h.inc | 15 +++++++------
 system/memory.c                         | 16 +++++++-------
 system/physmem.c                        | 28 +++++++++++++------------
 5 files changed, 53 insertions(+), 44 deletions(-)

-- 
2.53.0


Re: [PATCH v2 0/6] system/memory: Constify various AddressSpace/MemoryRegionCache arguments
Posted by Philippe Mathieu-Daudé 1 month, 1 week ago
> Philippe Mathieu-Daudé (6):
>    system/memory: Constify various AddressSpace arguments (checks)
>    system/memory: Constify various AddressSpace arguments (flat-range)
>    system/memory: Constify various AddressSpace arguments (notify)
>    system/memory: Constify various AddressSpace arguments (cache)
>    system/memory: Constify various AddressSpace arguments (access)
>    system/memory: Constify various MemoryRegionCache arguments

Queued, thanks.

Re: [PATCH v2 0/6] system/memory: Constify various AddressSpace/MemoryRegionCache arguments
Posted by Richard Henderson 1 month, 1 week ago
On 6/15/26 19:03, Philippe Mathieu-Daudé wrote:
> Philippe Mathieu-Daudé (6):
>    system/memory: Constify various AddressSpace arguments (checks)
>    system/memory: Constify various AddressSpace arguments (flat-range)
>    system/memory: Constify various AddressSpace arguments (notify)
>    system/memory: Constify various AddressSpace arguments (cache)
>    system/memory: Constify various AddressSpace arguments (access)
>    system/memory: Constify various MemoryRegionCache arguments

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~