virtio-iommu: Handle non power of 2 range invalidations
commitdde3f08b5cab24e570fc0ccbbbab86b6b50aad23
authorEric Auger <eric.auger@redhat.com>
Tue, 9 Mar 2021 10:27:38 +0000 (9 11:27 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 12 Mar 2021 12:40:10 +0000 (12 12:40 +0000)
tree72fca0e7a8992d390e867594cbfcf953d15b7e92
parentf14fb6c2db961c3665a61b342ab329b7bd20d1e7
virtio-iommu: Handle non power of 2 range invalidations

Unmap notifiers work with an address mask assuming an
invalidation range of a power of 2. Nothing mandates this
in the VIRTIO-IOMMU spec.

So in case the range is not a power of 2, split it into
several invalidations.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Message-id: 20210309102742.30442-4-eric.auger@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/virtio/virtio-iommu.c