]> git.proxmox.com Git - mirror_qemu.git/commit - memory.c
exec: reintroduce MemoryRegion caching
authorPaolo Bonzini <pbonzini@redhat.com>
Sun, 18 Mar 2018 17:26:36 +0000 (18:26 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 8 May 2018 22:13:38 +0000 (00:13 +0200)
commit48564041a73adbbff52834f9edbe3806fceefab7
tree6ea31760c88eaa9d3da36effab22e7d8343ebee2
parenta411c84b561baa94b28165c52f21c33517ee8f59
exec: reintroduce MemoryRegion caching

MemoryRegionCache was reverted to "normal" address_space_* operations
for 2.9, due to lack of support for IOMMUs.  Reinstate the
optimizations, caching only the IOMMU translation at address_cache_init
but not the IOMMU lookup and target AddressSpace translation are not
cached; now that MemoryRegionCache supports IOMMUs, it becomes more widely
applicable too.

The inlined fast path is defined in memory_ldst_cached.inc.h, while the
slow path uses memory_ldst.inc.c as before.  The smaller fast path causes
a little code size reduction in MemoryRegionCache users:

    hw/virtio/virtio.o text size before: 32373
    hw/virtio/virtio.o text size after: 31941

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
exec.c
include/exec/cpu-all.h
include/exec/memory-internal.h
include/exec/memory.h
include/exec/memory_ldst_cached.inc.h [new file with mode: 0644]
memory.c