gpu-compute: Read dispatch packet with timing DMA

This fixes occasional readBlob fatals caused by the functional read of
system memory, seen often with the KVM CPU.

Change-Id: Ifccee666f62faa5b2fcf0a64a9d77c8cf95b3add
This commit is contained in:
Matthew Poremba
2023-10-20 16:30:43 -05:00
parent 37da1c45f3
commit f07e0e7f5d
2 changed files with 99 additions and 61 deletions

View File

@@ -99,6 +99,8 @@ class GPUCommandProcessor : public DmaVirtDevice
Addr host_pkt_addr);
void attachDriver(GPUComputeDriver *driver);
void dispatchKernelObject(AMDKernelCode *akc, void *raw_pkt,
uint32_t queue_id, Addr host_pkt_addr);
void dispatchPkt(HSAQueueEntry *task);
void signalWakeupEvent(uint32_t event_id);
@@ -149,6 +151,9 @@ class GPUCommandProcessor : public DmaVirtDevice
HSAPacketProcessor *hsaPP;
TranslationGenPtr translate(Addr vaddr, Addr size) override;
// Running counter of dispatched tasks
int dynamic_task_id = 0;
// Keep track of start times for task dispatches.
std::unordered_map<Addr, Tick> dispatchStartTime;