Expose memory executable bit for SVM ranges
Add support to expose executable bit. Change-Id: I054f5c3173822c369dd9908eec5c449459600ce1 Signed-off-by: David Yat Sin <David.YatSin@amd.com>
Bu işleme şunda yer alıyor:
@@ -1826,6 +1826,14 @@ hsa_status_t Runtime::SetSvmAttrib(void* ptr, size_t size,
|
||||
clear_flags |= HSA_SVM_FLAG_GPU_READ_MOSTLY;
|
||||
break;
|
||||
}
|
||||
case HSA_AMD_SVM_ATTRIB_GPU_EXEC: {
|
||||
Check(attrib);
|
||||
if (value)
|
||||
set_flags |= HSA_SVM_FLAG_GPU_EXEC;
|
||||
else
|
||||
clear_flags |= HSA_SVM_FLAG_GPU_EXEC;
|
||||
break;
|
||||
}
|
||||
case HSA_AMD_SVM_ATTRIB_AGENT_ACCESSIBLE: {
|
||||
Agent* agent = Convert(value);
|
||||
ConfirmNew(agent);
|
||||
|
||||
@@ -2280,6 +2280,9 @@ typedef enum hsa_amd_svm_attribute_s {
|
||||
// range will be read operations.
|
||||
// Type of this attribute is bool.
|
||||
HSA_AMD_SVM_ATTRIB_READ_MOSTLY = 6,
|
||||
// Allows the execution on GPU.
|
||||
// Type of this attribute is bool.
|
||||
HSA_AMD_SVM_ATTRIB_GPU_EXEC = 7,
|
||||
// This attribute can not be used in ::hsa_amd_svm_attributes_get.
|
||||
// Enables an agent for access to the range. Access may incur a page fault
|
||||
// and associated memory migration. Either this or
|
||||
|
||||
Yeni konuda referans
Bir kullanıcı engelle