Skip to content

exec: reintroduce MemoryRegion caching

Paolo Bonzini qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4exec: move memory access declarations to a common header, inline *_phys functionsinclude/exec/cpu-all.h include/exec/memory.h include/exec/memory_ldst.inc.h +2 more+292 -2800 replies
2/4exec: small changes to flatview_do_translateexec.c+14 -191 reply
3/4exec: extract address_space_translate_iommu, fix page_mask corner caseexec.c+77 -352 replies
4/4exec: reintroduce MemoryRegion cachingexec.c include/exec/cpu-all.h include/exec/memory-internal.h +3 more+280 -200 replies

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchPeter Xu
1/4
2/4R-b
3/4R-b
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/4] exec: reintroduce MemoryRegion caching

MemoryRegionCache was reverted to "normal" address_space_* operations for 2.9, due to lack of support for IOMMUs. This series reinstates optimizations, caching only the IOMMU translation but not the IOMMU lookup and target AddressSpace translation.

Patches 1 to 3 prepare by introducing a new function address_space_translate_iommu (split out of address_space_translate) and new header files for declarations shared by regular and "cached" address_space_* functions. Patch 4 uses them to introduce both the slow path for IOMMU and MMIO cached regions, and the fast path for RAM cached regions.

Paolo

Paolo Bonzini (4):
exec: move memory access declarations to a common header, inline
*_phys functions
exec: small changes to flatview_do_translate
exec: extract address_space_translate_iommu, fix page_mask corner case
exec: reintroduce MemoryRegion caching

 exec.c                                | 245 ++++++++++++++++++++------
 include/exec/cpu-all.h                |  79 ++++-----
 include/exec/memory-internal.h        |   3 +
 include/exec/memory.h                 | 209 ++++++++++------------
 include/exec/memory_ldst.inc.h        |  71 ++++++++
 include/exec/memory_ldst_cached.inc.h | 108 ++++++++++++
 include/exec/memory_ldst_phys.inc.h   | 147 ++++++++++++++++
 memory.c                              |   4 +-
 memory_ldst.inc.c                     | 126 -------------
 9 files changed, 651 insertions(+), 341 deletions(-)
 create mode 100644 include/exec/memory_ldst.inc.h
 create mode 100644 include/exec/memory_ldst_cached.inc.h
 create mode 100644 include/exec/memory_ldst_phys.inc.h
Signature · 1 line
2.17.0