From 4d16b1158f21f5fcbef9752cedeaa452db9ebcfe Mon Sep 17 00:00:00 2001 From: Philip Yang Date: Wed, 9 Dec 2020 22:04:30 -0500 Subject: [PATCH] libhsakmt: dynamic HMM and xnack detection New properties SVMAPISupported added in Thunk spec HSA_CAPABILITY, read from sysfs from KFD topology. New local memory property flag CoherentHostAccess added to Thunk HSA_MEMORYPROPERTY, read from sysfs from KFD topology. Change-Id: I83933f0e5a61508508168873209dba4af0b77295 Signed-off-by: Philip Yang [ROCm/ROCR-Runtime commit: e8f369b385039baede98e2d1fb1cce7527d87870] --- projects/rocr-runtime/include/hsakmttypes.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/projects/rocr-runtime/include/hsakmttypes.h b/projects/rocr-runtime/include/hsakmttypes.h index 172643770e..efff03d912 100644 --- a/projects/rocr-runtime/include/hsakmttypes.h +++ b/projects/rocr-runtime/include/hsakmttypes.h @@ -214,7 +214,8 @@ typedef union unsigned int RASEventNotify: 1; // Indicates if GFX extended RASFeatures and RAS EventNotify status is available unsigned int ASICRevision: 4; // Indicates the ASIC revision of the chip on this node. unsigned int SRAM_EDCSupport: 1; // Indicates if GFX internal SRAM EDC/ECC functionality is active - unsigned int Reserved : 5; + unsigned int SVMAPISupported : 1; // Whether or not the SVM API is supported + unsigned int Reserved : 4; } ui32; } HSA_CAPABILITY; @@ -340,7 +341,8 @@ typedef union unsigned int HotPluggable : 1; // the memory may be removed by some system action, // memory should be used for temporary data unsigned int NonVolatile : 1; // memory content is preserved across a power-off cycle. - unsigned int Reserved :30; + unsigned int CoherentHostAccess: 1; // Whether or not device memory can be coherently accessed by the host CPU + unsigned int Reserved :29; } ui32; } HSA_MEMORYPROPERTY;