[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 10/15] intel-iommu: Implement IOMMU_ATTR_MAX_IOVA get_attr() a
From: |
Joao Martins |
Subject: |
[PATCH v4 10/15] intel-iommu: Implement IOMMU_ATTR_MAX_IOVA get_attr() attribute |
Date: |
Thu, 22 Jun 2023 22:48:40 +0100 |
From: Avihai Horon <avihaih@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 <avihaih@nvidia.com>
Signed-off-by: Joao Martins <joao.m.martins@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 ed2a46e008df..989993e303a6 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 = (hwaddr *)(uintptr_t) data;
+
+ *max_iova = MAKE_64BIT_MASK(0, s->aw_bits);;
+ break;
+ }
default:
ret = -EINVAL;
break;
--
2.17.2
- [PATCH v4 00/15] vfio: VFIO migration support with vIOMMU, Joao Martins, 2023/06/22
- [PATCH v4 01/15] hw/pci: Add a pci_setup_iommu_ops() helper, Joao Martins, 2023/06/22
- [PATCH v4 02/15] hw/pci: Refactor pci_device_iommu_address_space(), Joao Martins, 2023/06/22
- [PATCH v4 03/15] hw/pci: Introduce pci_device_iommu_get_attr(), Joao Martins, 2023/06/22
- [PATCH v4 04/15] intel-iommu: Switch to pci_setup_iommu_ops(), Joao Martins, 2023/06/22
- [PATCH v4 05/15] memory/iommu: Add IOMMU_ATTR_DMA_TRANSLATION attribute, Joao Martins, 2023/06/22
- [PATCH v4 06/15] intel-iommu: Implement get_attr() method, Joao Martins, 2023/06/22
- [PATCH v4 07/15] vfio/common: Track whether DMA Translation is enabled on the vIOMMU, Joao Martins, 2023/06/22
- [PATCH v4 08/15] vfio/common: Relax vIOMMU detection when DMA translation is off, Joao Martins, 2023/06/22
- [PATCH v4 09/15] memory/iommu: Add IOMMU_ATTR_MAX_IOVA attribute, Joao Martins, 2023/06/22
- [PATCH v4 10/15] intel-iommu: Implement IOMMU_ATTR_MAX_IOVA get_attr() attribute,
Joao Martins <=
- [PATCH v4 11/15] vfio/common: Move dirty tracking ranges update to helper, Joao Martins, 2023/06/22
- [PATCH v4 14/15] vfio/common: Optimize device dirty page tracking with vIOMMU, Joao Martins, 2023/06/22
- [PATCH v4 13/15] vfio/common: Extract vIOMMU code from vfio_sync_dirty_bitmap(), Joao Martins, 2023/06/22
- [PATCH v4 15/15] vfio/common: Block migration with vIOMMUs without address width limits, Joao Martins, 2023/06/22
- [PATCH v4 12/15] vfio/common: Support device dirty page tracking with vIOMMU, Joao Martins, 2023/06/22
- Re: [PATCH v4 00/15] vfio: VFIO migration support with vIOMMU, Joao Martins, 2023/06/22