Now the IOVA regions beyond the dma_mask and the vfio aperture are
removed from the usable IOVA ranges, the API becomes reliable to
compute the max IOVA. Let's advertise this by using a new version
for the capability.

Signed-off-by: Eric Auger <eric.au...@redhat.com>
---
 drivers/vfio/vfio_iommu_type1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c
index 5fbf0c1f7433..af4596123954 100644
--- a/drivers/vfio/vfio_iommu_type1.c
+++ b/drivers/vfio/vfio_iommu_type1.c
@@ -2541,7 +2541,7 @@ static int vfio_iommu_iova_add_cap(struct vfio_info_cap 
*caps,
        struct vfio_iommu_type1_info_cap_iova_range *iova_cap;
 
        header = vfio_info_cap_add(caps, size,
-                                  VFIO_IOMMU_TYPE1_INFO_CAP_IOVA_RANGE, 1);
+                                  VFIO_IOMMU_TYPE1_INFO_CAP_IOVA_RANGE, 2);
        if (IS_ERR(header))
                return PTR_ERR(header);
 
-- 
2.21.3

Reply via email to