Message ID | 20230622214845.3980-6-joao.m.martins@oracle.com |
---|---|
State | New |
Headers | show |
Series | vfio: VFIO migration support with vIOMMU | expand |
Hi Joao, On 6/22/23 23:48, Joao Martins wrote: > Add a new IOMMU attribute IOMMU_ATTR_DMA_TRANSLATION which indicates > whether the IOMMU supports DMA Translation. doesn't it return whether the DMA translation is enabled instead? > > This attribute will be used by VFIO device dirty page tracking so it can > restrict the IOVA under tracking to the memory map when vIOMMU is > enabled only for interrupt remapping without dma translation enabled. The above sentence sounds a bit cryptic to me. Knowing whether DMAR is enabled allows you to restrict the scope of dirty page tracking, is that a correct understand? Thanks Eric > > Signed-off-by: Joao Martins <joao.m.martins@oracle.com> > --- > include/exec/memory.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/include/exec/memory.h b/include/exec/memory.h > index 47c2e0221c35..5d6c2ab1f397 100644 > --- a/include/exec/memory.h > +++ b/include/exec/memory.h > @@ -319,7 +319,8 @@ typedef struct MemoryRegionClass { > > > enum IOMMUMemoryRegionAttr { > - IOMMU_ATTR_SPAPR_TCE_FD > + IOMMU_ATTR_SPAPR_TCE_FD, > + IOMMU_ATTR_DMA_TRANSLATION, > }; > > /*
diff --git a/include/exec/memory.h b/include/exec/memory.h index 47c2e0221c35..5d6c2ab1f397 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -319,7 +319,8 @@ typedef struct MemoryRegionClass { enum IOMMUMemoryRegionAttr { - IOMMU_ATTR_SPAPR_TCE_FD + IOMMU_ATTR_SPAPR_TCE_FD, + IOMMU_ATTR_DMA_TRANSLATION, }; /*
Add a new IOMMU attribute IOMMU_ATTR_DMA_TRANSLATION which indicates whether the IOMMU supports DMA Translation. This attribute will be used by VFIO device dirty page tracking so it can restrict the IOVA under tracking to the memory map when vIOMMU is enabled only for interrupt remapping without dma translation enabled. Signed-off-by: Joao Martins <joao.m.martins@oracle.com> --- include/exec/memory.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)