Skip to content
  • Peter Crosthwaite's avatar
    c3c1bb99
    exec: Respect as_tranlsate_internal length clamp · c3c1bb99
    Peter Crosthwaite authored
    
    
    address_space_translate_internal will clamp the *plen length argument
    based on the size of the memory region being queried. The iommu walker
    logic in addresss_space_translate was ignoring this by discarding the
    post fn call value of *plen. Fix by just always using *plen as the
    length argument throughout the fn, removing the len local variable.
    
    This fixes a bootloader bug when a single elf section spans multiple
    QEMU memory regions.
    
    Signed-off-by: default avatarPeter Crosthwaite <peter.crosthwaite@xilinx.com>
    Message-Id: <1426570554-15940-1-git-send-email-peter.crosthwaite@xilinx.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    c3c1bb99
    exec: Respect as_tranlsate_internal length clamp
    Peter Crosthwaite authored
    
    
    address_space_translate_internal will clamp the *plen length argument
    based on the size of the memory region being queried. The iommu walker
    logic in addresss_space_translate was ignoring this by discarding the
    post fn call value of *plen. Fix by just always using *plen as the
    length argument throughout the fn, removing the len local variable.
    
    This fixes a bootloader bug when a single elf section spans multiple
    QEMU memory regions.
    
    Signed-off-by: default avatarPeter Crosthwaite <peter.crosthwaite@xilinx.com>
    Message-Id: <1426570554-15940-1-git-send-email-peter.crosthwaite@xilinx.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Loading