[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 10/15] intel-iommu: Implement IOMMU_ATTR_MAX_IOVA get_attr() a
|
From: |
Joao Martins |
|
Subject: |
[PATCH v3 10/15] intel-iommu: Implement IOMMU_ATTR_MAX_IOVA get_attr() attribute |
|
Date: |
Tue, 30 May 2023 18:59:32 +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 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
- Re: [PATCH v3 01/15] hw/pci: Refactor pci_device_iommu_address_space(), (continued)
- [PATCH v3 03/15] hw/pci: Add a pci_device_iommu_memory_region() helper, Joao Martins, 2023/05/30
- [PATCH v3 04/15] intel-iommu: Switch to pci_setup_iommu_info(), Joao Martins, 2023/05/30
- [PATCH v3 05/15] vfio/common: Track the IOMMU MR behind the device in addition to the AS, Joao Martins, 2023/05/30
- [PATCH v3 06/15] memory/iommu: Add IOMMU_ATTR_DMA_TRANSLATION attribute, Joao Martins, 2023/05/30
- [PATCH v3 07/15] intel-iommu: Implement get_attr() method, Joao Martins, 2023/05/30
- [PATCH v3 08/15] vfio/common: Relax vIOMMU detection when DMA translation is off, Joao Martins, 2023/05/30
- [PATCH v3 09/15] memory/iommu: Add IOMMU_ATTR_MAX_IOVA attribute, Joao Martins, 2023/05/30
- [PATCH v3 10/15] intel-iommu: Implement IOMMU_ATTR_MAX_IOVA get_attr() attribute,
Joao Martins <=
- [PATCH v3 11/15] vfio/common: Move dirty tracking ranges update to helper, Joao Martins, 2023/05/30
- [PATCH v3 12/15] vfio/common: Support device dirty page tracking with vIOMMU, Joao Martins, 2023/05/30
- [PATCH v3 13/15] vfio/common: Extract vIOMMU code from vfio_sync_dirty_bitmap(), Joao Martins, 2023/05/30
- [PATCH v3 14/15] vfio/common: Optimize device dirty page tracking with vIOMMU, Joao Martins, 2023/05/30
- [PATCH v3 15/15] vfio/common: Block migration with vIOMMUs without address width limits, Joao Martins, 2023/05/30