diff mbox series

[13/18] memory/iommu: Add IOMMU_ATTR_MAX_IOVA attribute

Message ID 20230126184948.10478-14-avihaih@nvidia.com (mailing list archive)
State New, archived
Headers show
Series vfio: Add migration pre-copy support and device dirty tracking | expand

Commit Message

Avihai Horon Jan. 26, 2023, 6:49 p.m. UTC
Add a new IOMMU attribute IOMMU_ATTR_MAX_IOVA which indicates the
maximal IOVA that an IOMMU can use.

This attribute will be used by VFIO device dirty page tracking so it can
track the entire IOVA space when needed (i.e. when vIOMMU is enabled).

Signed-off-by: Avihai Horon <avihaih@nvidia.com>
---
 include/exec/memory.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Peter Xu Feb. 9, 2023, 10:16 p.m. UTC | #1
On Thu, Jan 26, 2023 at 08:49:43PM +0200, Avihai Horon wrote:
> Add a new IOMMU attribute IOMMU_ATTR_MAX_IOVA which indicates the
> maximal IOVA that an IOMMU can use.
> 
> This attribute will be used by VFIO device dirty page tracking so it can
> track the entire IOVA space when needed (i.e. when vIOMMU is enabled).
> 
> Signed-off-by: Avihai Horon <avihaih@nvidia.com>

Acked-by: Peter Xu <peterx@redhat.com>
diff mbox series

Patch

diff --git a/include/exec/memory.h b/include/exec/memory.h
index c37ffdbcd1..910067a3a5 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -290,7 +290,8 @@  typedef struct MemoryRegionClass {
 
 
 enum IOMMUMemoryRegionAttr {
-    IOMMU_ATTR_SPAPR_TCE_FD
+    IOMMU_ATTR_SPAPR_TCE_FD,
+    IOMMU_ATTR_MAX_IOVA,
 };
 
 /*