public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Auger <eric.auger@redhat.com>
To: eric.auger.pro@gmail.com, eric.auger@redhat.com, joro@8bytes.org,
	iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
	will.deacon@arm.com, robin.murphy@arm.com, dwmw2@infradead.org,
	alex.williamson@redhat.com
Cc: baolu.lu@linux.intel.com, shameerali.kolothum.thodi@huawei.com,
	jean-philippe.brucker@arm.com
Subject: [RFC 3/3] vfio/type1: Increase the version of VFIO_IOMMU_TYPE1_INFO_CAP_IOVA_RANGE
Date: Mon, 28 Sep 2020 21:50:37 +0200	[thread overview]
Message-ID: <20200928195037.22654-4-eric.auger@redhat.com> (raw)
In-Reply-To: <20200928195037.22654-1-eric.auger@redhat.com>

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.auger@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


  parent reply	other threads:[~2020-09-28 19:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-28 19:50 [RFC 0/3] iommu: Reserved regions for IOVAs beyond dma_mask and iommu aperture Eric Auger
2020-09-28 19:50 ` [RFC 1/3] iommu: Fix merging in iommu_insert_resv_region Eric Auger
2020-09-28 19:50 ` [RFC 2/3] iommu: Account for dma_mask and iommu aperture in IOVA reserved regions Eric Auger
2020-09-29  6:03   ` Christoph Hellwig
2020-09-29  7:20     ` Auger Eric
2020-09-28 19:50 ` Eric Auger [this message]
2020-09-28 22:42 ` [RFC 0/3] iommu: Reserved regions for IOVAs beyond dma_mask and iommu aperture Alex Williamson
2020-09-29  7:18   ` Auger Eric
2020-09-29 18:18     ` Alex Williamson
2020-09-30  9:59       ` Auger Eric
2020-10-05 10:44       ` Lorenzo Pieralisi
2020-10-05 13:08         ` Christoph Hellwig
2020-10-06 15:41           ` Auger Eric

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200928195037.22654-4-eric.auger@redhat.com \
    --to=eric.auger@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=dwmw2@infradead.org \
    --cc=eric.auger.pro@gmail.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jean-philippe.brucker@arm.com \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=shameerali.kolothum.thodi@huawei.com \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox