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 <Philip.Yang@amd.com>


[ROCm/ROCR-Runtime commit: e8f369b385]
This commit is contained in:
Philip Yang
2020-12-09 22:04:30 -05:00
zatwierdzone przez Felix Kuehling
rodzic 11e3516d74
commit 4d16b1158f
@@ -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;