Matthew Poremba has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/57670 )
(
10 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the
submitted one.
)Change subject: dev-hsa: Update QCntxt readIndex in HW scheduler write
......................................................................
dev-hsa: Update QCntxt readIndex in HW scheduler write
The QCntxt is reused when a queue is unmapped and mapped again. This is
fairly common in GPU full system. If this is not done the readIndex on
the queue context is reset to 1, causing getCommandsFromHost to read
from the wrong slot which is typically an old dispatch packet or an
invalid packet. This causes simulation to stall as the incorrect
completion signal is eventually written.
Change-Id: I65541e559fe04f5eb44b936ca37e3f802262fe6a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/57670
Reviewed-by: Matt Sinclair <mattdsincl...@gmail.com>
Maintainer: Matt Sinclair <mattdsincl...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/dev/hsa/hw_scheduler.cc
1 file changed, 25 insertions(+), 0 deletions(-)
Approvals:
Matt Sinclair: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/dev/hsa/hw_scheduler.cc b/src/dev/hsa/hw_scheduler.cc
index 91779ae..a0f1e87 100644
--- a/src/dev/hsa/hw_scheduler.cc
+++ b/src/dev/hsa/hw_scheduler.cc
@@ -335,6 +335,11 @@
uint32_t al_idx = dbMap[db_addr];
// Modify the write pointer
activeList[al_idx].qDesc->writeIndex = doorbell_reg;
+ // If a queue is unmapped and remapped (common in full system) the
qDesc
+ // gets reused. Keep the readIndex up to date so that when the HSA
packet
+ // processor gets commands from host, the correct entry is read after
+ // remapping.
+ activeList[al_idx].qDesc->readIndex = doorbell_reg - 1;
DPRINTF(HSAPacketProcessor, "queue %d qDesc->writeIndex %d\n",
al_idx, activeList[al_idx].qDesc->writeIndex);
// If this queue is mapped, then start DMA to fetch the
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/57670
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I65541e559fe04f5eb44b936ca37e3f802262fe6a
Gerrit-Change-Number: 57670
Gerrit-PatchSet: 17
Gerrit-Owner: Matthew Poremba <matthew.pore...@amd.com>
Gerrit-Reviewer: Kyle Roarty <kyleroarty1...@gmail.com>
Gerrit-Reviewer: Matt Sinclair <mattdsincl...@gmail.com>
Gerrit-Reviewer: Matthew Poremba <matthew.pore...@amd.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s