From 34499a0855e661c6c79caef334ea55e47f189c99 Mon Sep 17 00:00:00 2001 From: David Yat Sin Date: Fri, 20 Jan 2023 02:56:45 +0000 Subject: [PATCH] Add display for IOMMU Support Change-Id: I5af127ef1f9c1ae4b3b86b9e38272eb4f032191a [ROCm/rocminfo commit: 2c92e790f02c281cda82a4ac4564c2772eddd2a7] --- projects/rocminfo/rocminfo.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/projects/rocminfo/rocminfo.cc b/projects/rocminfo/rocminfo.cc index a6b4663b0b..c7bcba4dab 100755 --- a/projects/rocminfo/rocminfo.cc +++ b/projects/rocminfo/rocminfo.cc @@ -137,6 +137,7 @@ struct agent_info_t { bool fast_f16; uint32_t pkt_processor_ucode_ver; uint32_t sdma_ucode_ver; + hsa_amd_iommu_version_t iommu_support; }; // This structure holds memory pool information acquired through hsa info @@ -503,6 +504,10 @@ AcquireAgentInfo(hsa_agent_t agent, agent_info_t *agent_i) { (hsa_agent_info_t)HSA_AMD_AGENT_INFO_SDMA_UCODE_VERSION, &agent_i->sdma_ucode_ver); RET_IF_HSA_ERR(err); + err = hsa_agent_get_info(agent, + (hsa_agent_info_t)HSA_AMD_AGENT_INFO_IOMMU_SUPPORT, + &agent_i->iommu_support); + RET_IF_HSA_ERR(err); } return err; } @@ -641,6 +646,8 @@ static void DisplayAgentInfo(agent_info_t *agent_i) { printLabelInt("Packet Processor uCode::", agent_i->pkt_processor_ucode_ver, 1); printLabelInt("SDMA engine uCode::", agent_i->sdma_ucode_ver, 1); + printLabelStr("IOMMU Support::", + agent_i->iommu_support == HSA_IOMMU_SUPPORT_V2 ? "V2" : "None", 1); } }