Add support for reporting vm faults through the queue error handler.

Under xnack we can now identify the queue which generated a vm fault.
This allows users to identify which queue, and therefore which
dispatch, a vm fault came from.

Change-Id: If72ff3de05800f2b811aa7842a15eedff8b5e45a
This commit is contained in:
Sean Keely committed 2021-07-16 18:03:26 -05:00
1 parent ef1955ad42
commit 59ee761f81
3 files changed
+12 -1

No files matched your search

@@ -970,7 +970,7 @@ bool AqlQueue::ExceptionHandler(hsa_signal_value_t error_code, void* arg) {
// EC_QUEUE_WAVE_ILLEGAL_INSTRUCTION
4, (hsa_status_t)HSA_STATUS_ERROR_ILLEGAL_INSTRUCTION,
// EC_QUEUE_WAVE_MEMORY_VIOLATION
5, HSA_STATUS_ERROR,
5, (hsa_status_t)HSA_STATUS_ERROR_MEMORY_FAULT,
// EC_QUEUE_WAVE_APERTURE_VIOLATION
6, (hsa_status_t)HSA_STATUS_ERROR_MEMORY_APERTURE_VIOLATION,
// EC_QUEUE_PACKET_DISPATCH_DIM_INVALID
+4
View File
@@ -2758,6 +2758,10 @@ hsa_status_t hsa_status_string(
*status_string =
"HSA_EXT_STATUS_ERROR_DIRECTIVE_MISMATCH: Directive mismatch";
break;
case HSA_STATUS_ERROR_MEMORY_FAULT:
*status_string =
"HSA_STATUS_ERROR_MEMORY_FAULT: Agent attempted to access an inaccessible address.";
break;
default:
return HSA_STATUS_ERROR_INVALID_ARGUMENT;
}
+7
View File
@@ -184,6 +184,13 @@ enum {
* Agent executed an invalid shader instruction.
*/
HSA_STATUS_ERROR_ILLEGAL_INSTRUCTION = 42,
/**
* Agent attempted to access an inaccessible address.
* See hsa_amd_register_system_event_handler and
* HSA_AMD_GPU_MEMORY_FAULT_EVENT for more information on illegal accesses.
*/
HSA_STATUS_ERROR_MEMORY_FAULT = 43,
};
/**