From: Avihai Horon <avih...@nvidia.com> Implement get_attr() method and use the address width property to report the IOMMU_ATTR_MAX_IOVA attribute.
Signed-off-by: Avihai Horon <avih...@nvidia.com> Signed-off-by: Joao Martins <joao.m.mart...@oracle.com> --- hw/i386/intel_iommu.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 1906f3a67960..829dd6eadc6c 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c @@ -3876,6 +3876,13 @@ static int vtd_iommu_get_attr(IOMMUMemoryRegion *iommu_mr, *enabled = s->dma_translation; break; } + case IOMMU_ATTR_MAX_IOVA: + { + hwaddr *max_iova = data; + + *max_iova = (1ULL << s->aw_bits) - 1; + break; + } default: ret = -EINVAL; break; -- 2.39.3