Add query for IOMMU support

Reporting whether IOMMU V2 is supported.
IOMMU V1 support is not relevant to user, so not reporting it.

Change-Id: I77389484a87a352da9c2f7b2a5d9de264f90ee53
This commit is contained in:
David Yat Sin
2023-01-17 21:14:09 +00:00
parent 722794e258
commit e30be76f37
3 changed files with 30 additions and 2 deletions
+21 -2
View File
@@ -200,6 +200,21 @@ enum {
HSA_STATUS_CU_MASK_REDUCED = 44,
};
/**
* @brief IOMMU version supported
*/
typedef enum {
/**
* IOMMU not supported
*/
HSA_IOMMU_SUPPORT_NONE = 0,
/* IOMMU V1 support is not relevant to user applications, so not reporting it */
/**
* IOMMU V2 supported
*/
HSA_IOMMU_SUPPORT_V2 = 1,
} hsa_amd_iommu_version_t;
/**
* @brief Agent attributes.
*/
@@ -345,8 +360,12 @@ typedef enum hsa_amd_agent_info_s {
* Queries for the SDMA engine ucode of an agent.
* The type of this attribute is uint32_t.
*/
HSA_AMD_AGENT_INFO_SDMA_UCODE_VERSION = 0xA109
HSA_AMD_AGENT_INFO_SDMA_UCODE_VERSION = 0xA109,
/**
* Queries for version of IOMMU supported by agent.
* The type of this attribute is hsa_amd_iommu_version_t.
*/
HSA_AMD_AGENT_INFO_IOMMU_SUPPORT = 0xA110
} hsa_amd_agent_info_t;
typedef struct hsa_amd_hdp_flush_s {