util/vfio-helpers: Rework the IOVA allocator to avoid IOVA reserved regions
commit9ab5741164b1727d22f69fe7001382baf0d56977
authorEric Auger <eric.auger@redhat.com>
Tue, 29 Sep 2020 08:55:50 +0000 (29 10:55 +0200)
committerStefan Hajnoczi <stefanha@redhat.com>
Mon, 5 Oct 2020 09:59:42 +0000 (5 10:59 +0100)
tree3975b95109b20b898723acb110061630ec53b257
parent4487d420d0d0d9b503bfb9308e474f0bbac54700
util/vfio-helpers: Rework the IOVA allocator to avoid IOVA reserved regions

Introduce the qemu_vfio_find_fixed/temp_iova helpers which
respectively allocate IOVAs from the bottom/top parts of the
usable IOVA range, without picking within host IOVA reserved
windows. The allocation remains basic: if the size is too big
for the remaining of the current usable IOVA range, we jump
to the next one, leaving a hole in the address map.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Message-id: 20200929085550.30926-3-eric.auger@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
util/vfio-helpers.c