mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
memory: Introduce memory_region_iommu_set_iova_ranges
This helper will allow to convey information about valid IOVA ranges to virtual IOMMUS. Signed-off-by: Eric Auger <eric.auger@redhat.com> Acked-by: Peter Xu <peterx@redhat.com> Reviewed-by: "Michael S. Tsirkin" <mst@redhat.com> [ clg: fixes in memory_region_iommu_set_iova_ranges() and iommu_set_iova_ranges() documentation ] Signed-off-by: Cédric Le Goater <clg@redhat.com>
This commit is contained in:
parent
e8f433f80e
commit
51478a8ef5
2 changed files with 45 additions and 0 deletions
|
@ -1921,6 +1921,19 @@ int memory_region_iommu_set_page_size_mask(IOMMUMemoryRegion *iommu_mr,
|
|||
return ret;
|
||||
}
|
||||
|
||||
int memory_region_iommu_set_iova_ranges(IOMMUMemoryRegion *iommu_mr,
|
||||
GList *iova_ranges,
|
||||
Error **errp)
|
||||
{
|
||||
IOMMUMemoryRegionClass *imrc = IOMMU_MEMORY_REGION_GET_CLASS(iommu_mr);
|
||||
int ret = 0;
|
||||
|
||||
if (imrc->iommu_set_iova_ranges) {
|
||||
ret = imrc->iommu_set_iova_ranges(iommu_mr, iova_ranges, errp);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int memory_region_register_iommu_notifier(MemoryRegion *mr,
|
||||
IOMMUNotifier *n, Error **errp)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue