kfdtest: add send exception operation

Add send exception operation.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Change-Id: Iecb43004a1a7ffc75e94badf203cd0927ffe0909
This commit is contained in:
Jonathan Kim
2022-03-23 14:20:41 -04:00
zatwierdzone przez Jonathan Kim
rodzic dd56b38c2f
commit c7129edcb8
2 zmienionych plików z 16 dodań i 0 usunięć
+15
Wyświetl plik
@@ -96,3 +96,18 @@ void BaseDebug::Detach(void) {
m_Fd.fd = 0;
m_Fd.events = 0;
}
HSAKMT_STATUS BaseDebug::SendRuntimeEvent(uint64_t exceptions, int gpuId, int queueId)
{
struct kfd_ioctl_dbg_trap_args args = {0};
memset(&args, 0x00, sizeof(args));
args.pid = m_Pid;
args.op = KFD_IOC_DBG_TRAP_SEND_RUNTIME_EVENT;
args.send_runtime_event.exception_mask = exceptions;
args.send_runtime_event.gpu_id = gpuId;
args.send_runtime_event.queue_id = queueId;
return hsaKmtDebugTrapIoctl(&args, NULL);
}
+1
Wyświetl plik
@@ -40,6 +40,7 @@ class BaseDebug {
uint64_t exceptionEnable);
void Detach(void);
HSAKMT_STATUS SendRuntimeEvent(uint64_t exceptions, int gpuId, int queueId);
private:
unsigned int m_Pid;