]> git.ipfire.org Git - thirdparty/qemu.git/commit
util: add iova_tree_find_iova
authorEugenio Pérez <eperezma@redhat.com>
Mon, 14 Mar 2022 17:34:49 +0000 (18:34 +0100)
committerJason Wang <jasowang@redhat.com>
Tue, 15 Mar 2022 05:57:44 +0000 (13:57 +0800)
commit193d17be0b84cce87db4426622cd4e6b827cae2a
tree1b834015c8ef48efd5dcc5a11de3010d70e6011e
parent9376bde894e444ebe2d2ec236569b6e55faa4765
util: add iova_tree_find_iova

This function does the reverse operation of iova_tree_find: To look for
a mapping that match a translated address so we can do the reverse.

This have linear complexity instead of logarithmic, but it supports
overlapping HVA. Future developments could reduce it.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
include/qemu/iova-tree.h
util/iova-tree.c