Skip to content
Snippets Groups Projects
  • Paolo Bonzini's avatar
    48564041
    exec: reintroduce MemoryRegion caching · 48564041
    Paolo Bonzini authored
    
    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: default avatarPaolo Bonzini <pbonzini@redhat.com>
    48564041
    History
    exec: reintroduce MemoryRegion caching
    Paolo Bonzini authored
    
    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: default avatarPaolo Bonzini <pbonzini@redhat.com>