virtio-iommu: Implement set_iova_ranges() callback
commit30d40e39bdcb50e67f7cca7bee8bf59234c4ec12
authorEric Auger <eric.auger@redhat.com>
Thu, 19 Oct 2023 13:45:16 +0000 (19 15:45 +0200)
committerCédric Le Goater <clg@redhat.com>
Fri, 3 Nov 2023 08:20:31 +0000 (3 09:20 +0100)
treefabee07059fe8d66ab287c339367ab64ad6602b3
parent09b4c3d6a2f098e64cc25aa63f388ea943990279
virtio-iommu: Implement set_iova_ranges() callback

The implementation populates the array of per IOMMUDevice
host reserved ranges.

It is forbidden to have conflicting sets of host IOVA ranges
to be applied onto the same IOMMU MR (implied by different
host devices).

In case the callback is called after the probe request has
been issues by the driver, a warning is issued.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: "Michael S. Tsirkin" <mst@redhat.com>
Tested-by: Yanghang Liu <yanghliu@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
hw/virtio/virtio-iommu.c
include/hw/virtio/virtio-iommu.h