From fbc48521dc3a0b5c7147271e064aa3b331ec582c Mon Sep 17 00:00:00 2001 From: Sean Keely Date: Wed, 23 Mar 2022 20:35:33 -0500 Subject: [PATCH] Correct queue error reporting. VM faults should not report via the queue error handler. The system event contains much more useful information. Change-Id: I744d9b97b23334d7ed2c0f450111c1b8032567e3 --- runtime/hsa-runtime/core/runtime/amd_aql_queue.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/runtime/hsa-runtime/core/runtime/amd_aql_queue.cpp b/runtime/hsa-runtime/core/runtime/amd_aql_queue.cpp index 55936f83fb..683fcd864a 100644 --- a/runtime/hsa-runtime/core/runtime/amd_aql_queue.cpp +++ b/runtime/hsa-runtime/core/runtime/amd_aql_queue.cpp @@ -1042,6 +1042,13 @@ bool AqlQueue::ExceptionHandler(hsa_signal_value_t error_code, void* arg) { // Undefined or unexpected code assert((errorCode != HSA_STATUS_ERROR) && "Undefined or unexpected queue error code"); + // Suppress VM fault reporting. This is more useful when reported through the system error + // handler. + if (errorCode == HSA_STATUS_ERROR_MEMORY_FAULT) { + debug_print("Queue error - HSA_STATUS_ERROR_MEMORY_FAULT\n"); + return false; + } + queue->Suspend(); if (queue->errors_callback_ != nullptr) { queue->errors_callback_(errorCode, queue->public_handle(), queue->errors_data_);