This is a step towards merging the accessors for SE and FS modes.
Change-Id: I76818ab88b97097ac363e243be9cc1911b283090
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18579
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
 
     PortProxy &getPhysProxy() override { return actualTC->getPhysProxy(); }
 
-    FSTranslatingPortProxy &
+    PortProxy &
     getVirtProxy() override
     {
         return actualTC->getVirtProxy();
         actualTC->connectMemPorts(tc);
     }
 
-    SETranslatingPortProxy &
+    PortProxy &
     getMemProxy() override
     {
         return actualTC->getMemProxy();
 
 
     PortProxy &getPhysProxy() override { return thread->getPhysProxy(); }
 
-    FSTranslatingPortProxy &getVirtProxy() override;
+    PortProxy &getVirtProxy() override;
 
     void
     initMemProxies(ThreadContext *tc) override
         thread->initMemProxies(tc);
     }
 
-    SETranslatingPortProxy &
+    PortProxy &
     getMemProxy() override
     {
         return thread->getMemProxy();
 
 #include "debug/O3CPU.hh"
 
 template <class Impl>
-FSTranslatingPortProxy&
+PortProxy&
 O3ThreadContext<Impl>::getVirtProxy()
 {
     return thread->getVirtProxy();
 
     }
 
     PortProxy &getPhysProxy() override { return ThreadState::getPhysProxy(); }
-    FSTranslatingPortProxy &
-    getVirtProxy() override
-    {
-        return ThreadState::getVirtProxy();
-    }
+    PortProxy &getVirtProxy() override { return ThreadState::getVirtProxy(); }
 
     void initMemProxies(ThreadContext *tc) override
     {
         ThreadState::initMemProxies(tc);
     }
 
-    SETranslatingPortProxy &
+    PortProxy &
     getMemProxy() override
     {
         return ThreadState::getMemProxy();
 
 class CheckerCPU;
 class Checkpoint;
 class EndQuiesceEvent;
-class SETranslatingPortProxy;
-class FSTranslatingPortProxy;
 class PortProxy;
 class Process;
 class System;
 
     virtual PortProxy &getPhysProxy() = 0;
 
-    virtual FSTranslatingPortProxy &getVirtProxy() = 0;
+    virtual PortProxy &getVirtProxy() = 0;
 
     /**
      * Initialise the physical and virtual port proxies and tie them to
      */
     virtual void initMemProxies(ThreadContext *tc) = 0;
 
-    virtual SETranslatingPortProxy &getMemProxy() = 0;
+    virtual PortProxy &getMemProxy() = 0;
 
     virtual Process *getProcessPtr() = 0;
 
 
     return *physProxy;
 }
 
-FSTranslatingPortProxy &
+PortProxy &
 ThreadState::getVirtProxy()
 {
     assert(FullSystem);
     return *virtProxy;
 }
 
-SETranslatingPortProxy &
+PortProxy &
 ThreadState::getMemProxy()
 {
     assert(!FullSystem);
 
 
 class Checkpoint;
 
+class FSTranslatingPortProxy;
+class SETranslatingPortProxy;
+
 /**
  *  Struct for holding general thread state that is needed across CPU
  *  models.  This includes things such as pointers to the process,
 
     PortProxy &getPhysProxy();
 
-    FSTranslatingPortProxy &getVirtProxy();
+    PortProxy &getVirtProxy();
 
     Process *getProcessPtr() { return process; }
 
         }
     }
 
-    SETranslatingPortProxy &getMemProxy();
+    PortProxy &getMemProxy();
 
     /** Reads the number of instructions functionally executed and
      * committed.
 
          */
         delete np->pTable;
         np->pTable = pTable;
-        ntc->getMemProxy().setPageTable(np->pTable);
+        auto &proxy = dynamic_cast<SETranslatingPortProxy &>(
+                ntc->getMemProxy());
+        proxy.setPageTable(np->pTable);
 
         np->memState = memState;
     } else {