Skip to content
  • Eugenio Pérez's avatar
    ec6122d8
    vhost: Add VhostIOVATree · ec6122d8
    Eugenio Pérez authored
    
    
    This tree is able to look for a translated address from an IOVA address.
    
    At first glance it is similar to util/iova-tree. However, SVQ working on
    devices with limited IOVA space need more capabilities, like allocating
    IOVA chunks or performing reverse translations (qemu addresses to iova).
    
    The allocation capability, as "assign a free IOVA address to this chunk
    of memory in qemu's address space" allows shadow virtqueue to create a
    new address space that is not restricted by guest's addressable one, so
    we can allocate shadow vqs vrings outside of it.
    
    It duplicates the tree so it can search efficiently in both directions,
    and it will signal overlap if iova or the translated address is present
    in any tree.
    
    Signed-off-by: default avatarEugenio Pérez <eperezma@redhat.com>
    Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
    ec6122d8
    vhost: Add VhostIOVATree
    Eugenio Pérez authored
    
    
    This tree is able to look for a translated address from an IOVA address.
    
    At first glance it is similar to util/iova-tree. However, SVQ working on
    devices with limited IOVA space need more capabilities, like allocating
    IOVA chunks or performing reverse translations (qemu addresses to iova).
    
    The allocation capability, as "assign a free IOVA address to this chunk
    of memory in qemu's address space" allows shadow virtqueue to create a
    new address space that is not restricted by guest's addressable one, so
    we can allocate shadow vqs vrings outside of it.
    
    It duplicates the tree so it can search efficiently in both directions,
    and it will signal overlap if iova or the translated address is present
    in any tree.
    
    Signed-off-by: default avatarEugenio Pérez <eperezma@redhat.com>
    Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
Loading