util/vfio-helpers: Collect IOVA reserved regions
commit4487d420d0d0d9b503bfb9308e474f0bbac54700
authorEric Auger <eric.auger@redhat.com>
Tue, 29 Sep 2020 08:55:49 +0000 (29 10:55 +0200)
committerStefan Hajnoczi <stefanha@redhat.com>
Mon, 5 Oct 2020 09:59:42 +0000 (5 10:59 +0100)
tree288f9472e09fd1f1b3dded7683501f5df65dab7d
parentad1e691db208d2e04260f08f093bf22296344944
util/vfio-helpers: Collect IOVA reserved regions

The IOVA allocator currently ignores host reserved regions.
As a result some chosen IOVAs may collide with some of them,
resulting in VFIO MAP_DMA errors later on. This happens on ARM
where the MSI reserved window quickly is encountered:
[0x8000000, 0x8100000]. since 5.4 kernel, VFIO returns the usable
IOVA regions. So let's enumerate them in the prospect to avoid
them, later on.

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