iommu/virtio: Pass end address to viommu_add_mapping()
authorJean-Philippe Brucker <jean-philippe@linaro.org>
Wed, 1 Dec 2021 17:33:24 +0000 (17:33 +0000)
committerJoerg Roedel <jroedel@suse.de>
Mon, 6 Dec 2021 14:03:05 +0000 (15:03 +0100)
commitc0c763598960153e10622ff0a802012a073174a0
tree35616d0aab27652c3489f03b9d9804ba2951d31e
parent5610979415649f3743a7c3de03ab46c9a3bfff16
iommu/virtio: Pass end address to viommu_add_mapping()

To support identity mappings, the virtio-iommu driver must be able to
represent full 64-bit ranges internally. Pass (start, end) instead of
(start, size) to viommu_add/del_mapping().

Clean comments. The one about the returned size was never true: when
sweeping the whole address space the returned size will most certainly
be smaller than 2^64.

Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Link: https://lore.kernel.org/r/20211201173323.1045819-5-jean-philippe@linaro.org
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/virtio-iommu.c