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:
zatwierdzone przez
Jonathan Kim
rodzic
dd56b38c2f
commit
c7129edcb8
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user