Matthew Poremba has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/57529 )

 (

1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
 )Change subject: arch-vega: Bypass Ruby for functional page walks
......................................................................

arch-vega: Bypass Ruby for functional page walks

Currently if a Ruby functional access fails to find an address in the
caches, it gives up. For functional page table walks we need to be able
to go all the way to memory. This adds a pointer to the system object
which allows the walker to get a pointer to device memory which can be
used to do a functional access directly to memory bypassing Ruby.

Change-Id: I0ead6e5e130a0d53021c44ae9221b167c6316ab2
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/57529
Reviewed-by: Matt Sinclair <mattdsincl...@gmail.com>
Maintainer: Matt Sinclair <mattdsincl...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/arch/amdgpu/vega/pagetable_walker.cc
M src/arch/amdgpu/vega/pagetable_walker.hh
2 files changed, 27 insertions(+), 2 deletions(-)

Approvals:
  Matt Sinclair: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/arch/amdgpu/vega/pagetable_walker.cc b/src/arch/amdgpu/vega/pagetable_walker.cc
index 3725b32..bbbaa56 100644
--- a/src/arch/amdgpu/vega/pagetable_walker.cc
+++ b/src/arch/amdgpu/vega/pagetable_walker.cc
@@ -34,6 +34,7 @@
 #include <memory>

 #include "arch/amdgpu/vega/faults.hh"
+#include "mem/abstract_mem.hh"
 #include "mem/packet_access.hh"

 namespace gem5
@@ -84,7 +85,9 @@
         DPRINTF(GPUPTWalker, "Sending functional read to %#lx\n",
                 read->getAddr());

-        walker->port.sendFunctional(read);
+        auto devmem = walker->system->getDeviceMemory(read);
+        assert(devmem);
+        devmem->access(read);

         fault = stepWalk();
         assert(fault == NoFault || read == NULL);
diff --git a/src/arch/amdgpu/vega/pagetable_walker.hh b/src/arch/amdgpu/vega/pagetable_walker.hh
index 48e1e60..b00c0a0 100644
--- a/src/arch/amdgpu/vega/pagetable_walker.hh
+++ b/src/arch/amdgpu/vega/pagetable_walker.hh
@@ -179,6 +179,9 @@
     void walkerResponse(WalkerState *state, VegaTlbEntry& entry,
                         PacketPtr pkt);

+    // System pointer for functional accesses
+    System *system;
+
   public:
     void setTLB(GpuTLB * _tlb)
     {
@@ -191,7 +194,7 @@
         port(name() + ".port", this),
         funcState(this, nullptr, true), tlb(nullptr),
         requestorId(p.system->getRequestorId(this)),
-        deviceRequestorId(999)
+        deviceRequestorId(999), system(p.system)
     {
         DPRINTF(GPUPTWalker, "Walker::Walker %p\n", this);
     }

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/57529
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: I0ead6e5e130a0d53021c44ae9221b167c6316ab2
Gerrit-Change-Number: 57529
Gerrit-PatchSet: 18
Gerrit-Owner: Matthew Poremba <matthew.pore...@amd.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

Reply via email to