Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/18581

Change subject: arch, base, cpu, gpu, sim: Merge getMemProxy and getVirtProxy.
......................................................................

arch, base, cpu, gpu, sim: Merge getMemProxy and getVirtProxy.

These two functions were performing the same function but had two
different names for historical reasons. This change merges them
together, keeping the getVirtProxy name to be consistent with the
getPhysProxy method used to get a non-translating proxy port.

Change-Id: Idd83c6b899f9343795075b030ccbc723a79e52a4
---
M src/arch/alpha/linux/process.cc
M src/arch/arm/freebsd/process.cc
M src/arch/arm/linux/process.cc
M src/arch/mips/linux/process.cc
M src/arch/power/linux/process.cc
M src/arch/riscv/linux/process.cc
M src/arch/sparc/linux/syscalls.cc
M src/arch/sparc/process.cc
M src/arch/sparc/solaris/process.cc
M src/arch/x86/linux/process.cc
M src/arch/x86/pseudo_inst.cc
M src/base/remote_gdb.cc
M src/cpu/checker/thread_context.hh
M src/cpu/o3/thread_context.hh
M src/cpu/simple_thread.hh
M src/cpu/thread_context.hh
M src/cpu/thread_state.cc
M src/cpu/thread_state.hh
M src/gpu-compute/cl_driver.cc
M src/sim/process.cc
M src/sim/syscall_emul.cc
M src/sim/syscall_emul.hh
22 files changed, 178 insertions(+), 213 deletions(-)



diff --git a/src/arch/alpha/linux/process.cc b/src/arch/alpha/linux/process.cc
index c1162ba..6e0f075 100644
--- a/src/arch/alpha/linux/process.cc
+++ b/src/arch/alpha/linux/process.cc
@@ -58,7 +58,7 @@
     strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003");
     strcpy(name->machine, "alpha");

-    name.copyOut(tc->getMemProxy());
+    name.copyOut(tc->getVirtProxy());
     return 0;
 }

@@ -80,7 +80,7 @@
           TypedBufferArg<uint64_t> fpcr(bufPtr);
           // I don't think this exactly matches the HW FPCR
           *fpcr = 0;
-          fpcr.copyOut(tc->getMemProxy());
+          fpcr.copyOut(tc->getVirtProxy());
           return 0;
       }

@@ -108,7 +108,7 @@
       case 14: { // SSI_IEEE_FP_CONTROL
           TypedBufferArg<uint64_t> fpcr(bufPtr);
           // I don't think this exactly matches the HW FPCR
-          fpcr.copyIn(tc->getMemProxy());
+          fpcr.copyIn(tc->getVirtProxy());
           DPRINTFR(SyscallVerbose, "osf_setsysinfo(SSI_IEEE_FP_CONTROL): "
                    " setting FPCR to 0x%x\n", gtoh(*(uint64_t*)fpcr));
           return 0;
diff --git a/src/arch/arm/freebsd/process.cc b/src/arch/arm/freebsd/process.cc
index e6aa740..a563e4d 100644
--- a/src/arch/arm/freebsd/process.cc
+++ b/src/arch/arm/freebsd/process.cc
@@ -79,13 +79,13 @@
     BufferArg buf3(oldlenp, sizeof(size_t));
     BufferArg buf4(newp, sizeof(size_t));

-    buf.copyIn(tc->getMemProxy());
-    buf2.copyIn(tc->getMemProxy());
-    buf3.copyIn(tc->getMemProxy());
+    buf.copyIn(tc->getVirtProxy());
+    buf2.copyIn(tc->getVirtProxy());
+    buf3.copyIn(tc->getVirtProxy());

     void *hnewp = NULL;
     if (newp) {
-        buf4.copyIn(tc->getMemProxy());
+        buf4.copyIn(tc->getVirtProxy());
         hnewp = (void *)buf4.bufferPtr();
     }

@@ -95,11 +95,11 @@

     ret = sysctl((int *)hnamep, namelen, holdp, holdlenp, hnewp, newlen);

-    buf.copyOut(tc->getMemProxy());
-    buf2.copyOut(tc->getMemProxy());
-    buf3.copyOut(tc->getMemProxy());
+    buf.copyOut(tc->getVirtProxy());
+    buf2.copyOut(tc->getVirtProxy());
+    buf3.copyOut(tc->getVirtProxy());
     if (newp)
-        buf4.copyOut(tc->getMemProxy());
+        buf4.copyOut(tc->getVirtProxy());

     return (ret);
 }
diff --git a/src/arch/arm/linux/process.cc b/src/arch/arm/linux/process.cc
index 2084578..bb78b40 100644
--- a/src/arch/arm/linux/process.cc
+++ b/src/arch/arm/linux/process.cc
@@ -75,7 +75,7 @@
     strcpy(name->version, "#1 SMP Sat Dec  1 00:00:00 GMT 2012");
     strcpy(name->machine, "armv7l");

-    name.copyOut(tc->getMemProxy());
+    name.copyOut(tc->getVirtProxy());
     return 0;
 }

@@ -93,7 +93,7 @@
     strcpy(name->version, "#1 SMP Sat Dec  1 00:00:00 GMT 2012");
     strcpy(name->machine, "armv8l");

-    name.copyOut(tc->getMemProxy());
+    name.copyOut(tc->getVirtProxy());
     return 0;
 }

@@ -105,7 +105,7 @@
     int index = 0;
     uint32_t tlsPtr = process->getSyscallArg(tc, index);

-    tc->getMemProxy().writeBlob(ArmLinuxProcess32::commPage + 0x0ff0,
+    tc->getVirtProxy().writeBlob(ArmLinuxProcess32::commPage + 0x0ff0,
                                 &tlsPtr, sizeof(tlsPtr));
     tc->setMiscReg(MISCREG_TPIDRURO,tlsPtr);
     return 0;
@@ -1695,8 +1695,8 @@

     // Fill this page with swi -1 so we'll no if we land in it somewhere.
     for (Addr addr = 0; addr < PageBytes; addr += sizeof(swiNeg1)) {
-        tc->getMemProxy().writeBlob(commPage + addr,
-                                    swiNeg1, sizeof(swiNeg1));
+        tc->getVirtProxy().writeBlob(commPage + addr,
+                                     swiNeg1, sizeof(swiNeg1));
     }

     uint8_t memory_barrier[] =
@@ -1704,8 +1704,8 @@
         0x5f, 0xf0, 0x7f, 0xf5, // dmb
         0x0e, 0xf0, 0xa0, 0xe1  // return
     };
-    tc->getMemProxy().writeBlob(commPage + 0x0fa0, memory_barrier,
-                                sizeof(memory_barrier));
+    tc->getVirtProxy().writeBlob(commPage + 0x0fa0, memory_barrier,
+                                 sizeof(memory_barrier));

     uint8_t cmpxchg[] =
     {
@@ -1718,7 +1718,7 @@
         0x5f, 0xf0, 0x7f, 0xf5,  // dmb
         0x0e, 0xf0, 0xa0, 0xe1   // return
     };
- tc->getMemProxy().writeBlob(commPage + 0x0fc0, cmpxchg, sizeof(cmpxchg)); + tc->getVirtProxy().writeBlob(commPage + 0x0fc0, cmpxchg, sizeof(cmpxchg));

     uint8_t get_tls[] =
     {
@@ -1726,7 +1726,7 @@
         0x70, 0x0f, 0x1d, 0xee, // mrc p15, 0, r0, c13, c0, 3
         0x0e, 0xf0, 0xa0, 0xe1  // return
     };
- tc->getMemProxy().writeBlob(commPage + 0x0fe0, get_tls, sizeof(get_tls)); + tc->getVirtProxy().writeBlob(commPage + 0x0fe0, get_tls, sizeof(get_tls));
 }

 void
diff --git a/src/arch/mips/linux/process.cc b/src/arch/mips/linux/process.cc
index b1c09a5..64e4f96 100644
--- a/src/arch/mips/linux/process.cc
+++ b/src/arch/mips/linux/process.cc
@@ -61,7 +61,7 @@
     strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003");
     strcpy(name->machine, "mips");

-    name.copyOut(tc->getMemProxy());
+    name.copyOut(tc->getVirtProxy());
     return 0;
 }

@@ -84,7 +84,7 @@
             TypedBufferArg<uint64_t> fpcr(bufPtr);
             // I don't think this exactly matches the HW FPCR
             *fpcr = 0;
-            fpcr.copyOut(tc->getMemProxy());
+            fpcr.copyOut(tc->getVirtProxy());
             return 0;
         }
       default:
@@ -113,7 +113,7 @@
             // SSI_IEEE_FP_CONTROL
             TypedBufferArg<uint64_t> fpcr(bufPtr);
             // I don't think this exactly matches the HW FPCR
-            fpcr.copyIn(tc->getMemProxy());
+            fpcr.copyIn(tc->getVirtProxy());
DPRINTFR(SyscallVerbose, "sys_setsysinfo(SSI_IEEE_FP_CONTROL): "
                    " setting FPCR to 0x%x\n", gtoh(*(uint64_t*)fpcr));
             return 0;
diff --git a/src/arch/power/linux/process.cc b/src/arch/power/linux/process.cc
index 664b93b..686bbb1 100644
--- a/src/arch/power/linux/process.cc
+++ b/src/arch/power/linux/process.cc
@@ -61,7 +61,7 @@
     strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003");
     strcpy(name->machine, "power");

-    name.copyOut(tc->getMemProxy());
+    name.copyOut(tc->getVirtProxy());
     return 0;
 }

diff --git a/src/arch/riscv/linux/process.cc b/src/arch/riscv/linux/process.cc
index 7239920..d2b5ee0 100644
--- a/src/arch/riscv/linux/process.cc
+++ b/src/arch/riscv/linux/process.cc
@@ -65,7 +65,7 @@
     strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003");
     strcpy(name->machine, "riscv64");

-    name.copyOut(tc->getMemProxy());
+    name.copyOut(tc->getVirtProxy());
     return 0;
 }

@@ -83,7 +83,7 @@
     strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003");
     strcpy(name->machine, "riscv32");

-    name.copyOut(tc->getMemProxy());
+    name.copyOut(tc->getVirtProxy());
     return 0;
 }

diff --git a/src/arch/sparc/linux/syscalls.cc b/src/arch/sparc/linux/syscalls.cc
index 773982a..1f848b8 100644
--- a/src/arch/sparc/linux/syscalls.cc
+++ b/src/arch/sparc/linux/syscalls.cc
@@ -51,7 +51,7 @@
     strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003");
     strcpy(name->machine, "sparc");

-    name.copyOut(tc->getMemProxy());
+    name.copyOut(tc->getVirtProxy());

     return 0;
 }
@@ -70,19 +70,19 @@
     if (ruid) {
         BufferArg ruidBuff(ruid, sizeof(uint64_t));
         memcpy(ruidBuff.bufferPtr(), &id, sizeof(uint64_t));
-        ruidBuff.copyOut(tc->getMemProxy());
+        ruidBuff.copyOut(tc->getVirtProxy());
     }
     // Set the euid
     if (euid) {
         BufferArg euidBuff(euid, sizeof(uint64_t));
         memcpy(euidBuff.bufferPtr(), &id, sizeof(uint64_t));
-        euidBuff.copyOut(tc->getMemProxy());
+        euidBuff.copyOut(tc->getVirtProxy());
     }
     // Set the suid
     if (suid) {
         BufferArg suidBuff(suid, sizeof(uint64_t));
         memcpy(suidBuff.bufferPtr(), &id, sizeof(uint64_t));
-        suidBuff.copyOut(tc->getMemProxy());
+        suidBuff.copyOut(tc->getVirtProxy());
     }
     return 0;
 }
diff --git a/src/arch/sparc/process.cc b/src/arch/sparc/process.cc
index 3bd3ea0..d89c606 100644
--- a/src/arch/sparc/process.cc
+++ b/src/arch/sparc/process.cc
@@ -451,7 +451,7 @@
             for (int index = 16; index < 32; index++) {
                 uint32_t regVal = tc->readIntReg(index);
                 regVal = htog(regVal);
-                if (!tc->getMemProxy().tryWriteBlob(
+                if (!tc->getVirtProxy().tryWriteBlob(
                         sp + (index - 16) * 4, (uint8_t *)&regVal, 4)) {
                     warn("Failed to save register to the stack when "
                             "flushing windows.\n");
@@ -486,7 +486,7 @@
             for (int index = 16; index < 32; index++) {
                 RegVal regVal = tc->readIntReg(index);
                 regVal = htog(regVal);
-                if (!tc->getMemProxy().tryWriteBlob(
+                if (!tc->getVirtProxy().tryWriteBlob(
sp + 2047 + (index - 16) * 8, (uint8_t *)&regVal, 8)) {
                     warn("Failed to save register to the stack when "
                             "flushing windows.\n");
diff --git a/src/arch/sparc/solaris/process.cc b/src/arch/sparc/solaris/process.cc
index bcdd088..ab04fbc 100644
--- a/src/arch/sparc/solaris/process.cc
+++ b/src/arch/sparc/solaris/process.cc
@@ -57,7 +57,7 @@
     strcpy(name->version, "Generic_118558-21");
     strcpy(name->machine, "sun4u");

-    name.copyOut(tc->getMemProxy());
+    name.copyOut(tc->getVirtProxy());

     return 0;
 }
diff --git a/src/arch/x86/linux/process.cc b/src/arch/x86/linux/process.cc
index 094593c..0acb0d8 100644
--- a/src/arch/x86/linux/process.cc
+++ b/src/arch/x86/linux/process.cc
@@ -68,7 +68,7 @@
     strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003");
     strcpy(name->machine, "x86_64");

-    name.copyOut(tc->getMemProxy());
+    name.copyOut(tc->getVirtProxy());

     return 0;
 }
@@ -90,7 +90,7 @@
     int code = process->getSyscallArg(tc, index);
     uint64_t addr = process->getSyscallArg(tc, index);
     uint64_t fsBase, gsBase;
-    PortProxy &p = tc->getMemProxy();
+    PortProxy &p = tc->getVirtProxy();
     switch(code)
     {
       // Each of these valid options should actually check addr.
@@ -158,10 +158,10 @@
         gdt(x86p->gdtStart() + minTLSEntry * sizeof(uint64_t),
             numTLSEntries * sizeof(uint64_t));

-    if (!userDesc.copyIn(tc->getMemProxy()))
+    if (!userDesc.copyIn(tc->getVirtProxy()))
         return -EFAULT;

-    if (!gdt.copyIn(tc->getMemProxy()))
+    if (!gdt.copyIn(tc->getVirtProxy()))
         panic("Failed to copy in GDT for %s.\n", desc->name());

     if (userDesc->entry_number == (uint32_t)(-1)) {
@@ -213,9 +213,9 @@

     gdt[index] = (uint64_t)segDesc;

-    if (!userDesc.copyOut(tc->getMemProxy()))
+    if (!userDesc.copyOut(tc->getVirtProxy()))
         return -EFAULT;
-    if (!gdt.copyOut(tc->getMemProxy()))
+    if (!gdt.copyOut(tc->getVirtProxy()))
         panic("Failed to copy out GDT for %s.\n", desc->name());

     return 0;
diff --git a/src/arch/x86/pseudo_inst.cc b/src/arch/x86/pseudo_inst.cc
index 253c914..6c1a7f8 100644
--- a/src/arch/x86/pseudo_inst.cc
+++ b/src/arch/x86/pseudo_inst.cc
@@ -68,7 +68,7 @@

     Process *p = tc->getProcessPtr();
     if (!p->fixupStackFault(tc->readMiscReg(MISCREG_CR2))) {
-        PortProxy &proxy = tc->getMemProxy();
+        PortProxy &proxy = tc->getVirtProxy();
         // at this point we should have 6 values on the interrupt stack
         int size = 6;
         uint64_t is[size];
diff --git a/src/base/remote_gdb.cc b/src/base/remote_gdb.cc
index 347345d..77b3fbc 100644
--- a/src/base/remote_gdb.cc
+++ b/src/base/remote_gdb.cc
@@ -624,13 +624,8 @@

     DPRINTF(GDBRead, "read:  addr=%#x, size=%d", vaddr, size);

-    if (FullSystem) {
-        PortProxy &proxy = tc->getVirtProxy();
-        proxy.readBlob(vaddr, data, size);
-    } else {
-        PortProxy &proxy = tc->getMemProxy();
-        proxy.readBlob(vaddr, data, size);
-    }
+    PortProxy &proxy = tc->getVirtProxy();
+    proxy.readBlob(vaddr, data, size);

 #if TRACING_ON
     if (DTRACE(GDBRead)) {
@@ -667,13 +662,8 @@
         } else
             DPRINTFNR("\n");
     }
-    if (FullSystem) {
-        PortProxy &proxy = tc->getVirtProxy();
-        proxy.writeBlob(vaddr, data, size);
-    } else {
-        PortProxy &proxy = tc->getMemProxy();
-        proxy.writeBlob(vaddr, data, size);
-    }
+    PortProxy &proxy = tc->getVirtProxy();
+    proxy.writeBlob(vaddr, data, size);

     return true;
 }
diff --git a/src/cpu/checker/thread_context.hh b/src/cpu/checker/thread_context.hh
index 46ade24..2e5f31d 100644
--- a/src/cpu/checker/thread_context.hh
+++ b/src/cpu/checker/thread_context.hh
@@ -164,12 +164,6 @@
         actualTC->connectMemPorts(tc);
     }

-    PortProxy &
-    getMemProxy() override
-    {
-        return actualTC->getMemProxy();
-    }
-
     /** Executes a syscall in SE mode. */
     void
     syscall(int64_t callnum, Fault *fault) override
diff --git a/src/cpu/o3/thread_context.hh b/src/cpu/o3/thread_context.hh
index a3698cf..9029aba 100644
--- a/src/cpu/o3/thread_context.hh
+++ b/src/cpu/o3/thread_context.hh
@@ -140,12 +140,6 @@
         thread->initMemProxies(tc);
     }

-    PortProxy &
-    getMemProxy() override
-    {
-        return thread->getMemProxy();
-    }
-
     /** Returns this thread's status. */
     Status status() const override { return thread->status(); }

diff --git a/src/cpu/simple_thread.hh b/src/cpu/simple_thread.hh
index b044f53..0312775 100644
--- a/src/cpu/simple_thread.hh
+++ b/src/cpu/simple_thread.hh
@@ -220,12 +220,6 @@
         ThreadState::initMemProxies(tc);
     }

-    PortProxy &
-    getMemProxy() override
-    {
-        return ThreadState::getMemProxy();
-    }
-
Process *getProcessPtr() override { return ThreadState::getProcessPtr(); } void setProcessPtr(Process *p) override { ThreadState::setProcessPtr(p); }

diff --git a/src/cpu/thread_context.hh b/src/cpu/thread_context.hh
index f8b69d0..0bd2930 100644
--- a/src/cpu/thread_context.hh
+++ b/src/cpu/thread_context.hh
@@ -160,8 +160,6 @@
      */
     virtual void initMemProxies(ThreadContext *tc) = 0;

-    virtual PortProxy &getMemProxy() = 0;
-
     virtual Process *getProcessPtr() = 0;

     virtual void setProcessPtr(Process *p) = 0;
diff --git a/src/cpu/thread_state.cc b/src/cpu/thread_state.cc
index 3396c75..dc4a624 100644
--- a/src/cpu/thread_state.cc
+++ b/src/cpu/thread_state.cc
@@ -134,15 +134,6 @@
 PortProxy &
 ThreadState::getVirtProxy()
 {
-    assert(FullSystem);
-    assert(virtProxy != NULL);
-    return *virtProxy;
-}
-
-PortProxy &
-ThreadState::getMemProxy()
-{
-    assert(!FullSystem);
     assert(virtProxy != NULL);
     return *virtProxy;
 }
diff --git a/src/cpu/thread_state.hh b/src/cpu/thread_state.hh
index db4a3f4..3e4b29c 100644
--- a/src/cpu/thread_state.hh
+++ b/src/cpu/thread_state.hh
@@ -122,8 +122,6 @@
         }
     }

-    PortProxy &getMemProxy();
-
     /** Reads the number of instructions functionally executed and
      * committed.
      */
diff --git a/src/gpu-compute/cl_driver.cc b/src/gpu-compute/cl_driver.cc
index 119091f..385ea63 100644
--- a/src/gpu-compute/cl_driver.cc
+++ b/src/gpu-compute/cl_driver.cc
@@ -135,7 +135,7 @@
                     k->numInsts() * sizeof(TheGpuISA::RawMachInst);
             }

-            sizes.copyOut(tc->getMemProxy());
+            sizes.copyOut(tc->getVirtProxy());
         }
         break;

@@ -156,7 +156,7 @@
                 ki->spill_mem_size   = kernelInfo[i].spill_mem_size;
             }

-            kinfo.copyOut(tc->getMemProxy());
+            kinfo.copyOut(tc->getVirtProxy());
         }
         break;

@@ -181,7 +181,7 @@

             assert(bufp - (char *)buf.bufferPtr() == string_table_size);

-            buf.copyOut(tc->getMemProxy());
+            buf.copyOut(tc->getVirtProxy());
         }
         break;

@@ -196,7 +196,7 @@
             memcpy(datap,
                    kernels.back()->readonly_data,
                    size);
-            data.copyOut(tc->getMemProxy());
+            data.copyOut(tc->getVirtProxy());
         }
         break;

@@ -225,7 +225,7 @@
                 }
             }

-            buf.copyOut(tc->getMemProxy());
+            buf.copyOut(tc->getVirtProxy());
         }
         break;

@@ -233,7 +233,7 @@
         {
             BufferArg buf(buf_addr, sizeof(uint32_t));
             *((uint32_t*)buf.bufferPtr()) = dispatcher->getNumCUs();
-            buf.copyOut(tc->getMemProxy());
+            buf.copyOut(tc->getVirtProxy());
         }
         break;

@@ -241,14 +241,14 @@
         {
             BufferArg buf(buf_addr, sizeof(uint32_t));
             *((uint32_t*)buf.bufferPtr()) = dispatcher->wfSize();
-            buf.copyOut(tc->getMemProxy());
+            buf.copyOut(tc->getVirtProxy());
         }
         break;
       case HSA_GET_HW_STATIC_CONTEXT_SIZE:
         {
             BufferArg buf(buf_addr, sizeof(uint32_t));
*((uint32_t*)buf.bufferPtr()) = dispatcher->getStaticContextSize();
-            buf.copyOut(tc->getMemProxy());
+            buf.copyOut(tc->getVirtProxy());
         }
         break;

diff --git a/src/sim/process.cc b/src/sim/process.cc
index 1249814..5ce1466 100644
--- a/src/sim/process.cc
+++ b/src/sim/process.cc
@@ -189,7 +189,7 @@
         delete np->pTable;
         np->pTable = pTable;
         auto &proxy = dynamic_cast<SETranslatingPortProxy &>(
-                ntc->getMemProxy());
+                ntc->getVirtProxy());
         proxy.setPageTable(np->pTable);

         np->memState = memState;
@@ -338,13 +338,13 @@

     // Read from old physical page.
     uint8_t *buf_p = new uint8_t[PageBytes];
-    old_tc->getMemProxy().readBlob(vaddr, buf_p, PageBytes);
+    old_tc->getVirtProxy().readBlob(vaddr, buf_p, PageBytes);

     // Create new mapping in process address space by clobbering existing
     // mapping (if any existed) and then write to the new physical page.
     bool clobber = true;
     pTable->map(vaddr, new_paddr, PageBytes, clobber);
-    new_tc->getMemProxy().writeBlob(vaddr, buf_p, PageBytes);
+    new_tc->getVirtProxy().writeBlob(vaddr, buf_p, PageBytes);
     delete[] buf_p;
 }

diff --git a/src/sim/syscall_emul.cc b/src/sim/syscall_emul.cc
index f1400f6..922e3e1 100644
--- a/src/sim/syscall_emul.cc
+++ b/src/sim/syscall_emul.cc
@@ -86,7 +86,7 @@
     BufferArg ctidBuf(addr, sizeof(long));
     long *ctid = (long *)ctidBuf.bufferPtr();
     *ctid = 0;
-    ctidBuf.copyOut(tc->getMemProxy());
+    ctidBuf.copyOut(tc->getVirtProxy());

     FutexMap &futex_map = tc->getSystemPtr()->futexMap;
     // Wake one of the waiting threads.
@@ -260,7 +260,7 @@
             // if the address is already there, zero it out
             else {
                 uint8_t zero = 0;
-                PortProxy &tp = tc->getMemProxy();
+                PortProxy &tp = tc->getVirtProxy();

                 // split non-page aligned accesses
                 Addr next_page = roundUp(gen.addr(), PageBytes);
@@ -346,7 +346,7 @@
     // Assuming that the size of loff_t is 64 bits on the target platform
     BufferArg result_buf(result_ptr, sizeof(result));
     memcpy(result_buf.bufferPtr(), &result, sizeof(result));
-    result_buf.copyOut(tc->getMemProxy());
+    result_buf.copyOut(tc->getVirtProxy());
     return 0;
 }

@@ -373,7 +373,7 @@

     strncpy((char *)name.bufferPtr(), hostname, name_len);

-    name.copyOut(tc->getMemProxy());
+    name.copyOut(tc->getVirtProxy());

     return 0;
 }
@@ -404,7 +404,7 @@
         }
     }

-    buf.copyOut(tc->getMemProxy());
+    buf.copyOut(tc->getVirtProxy());

     return (result == -1) ? -errno : result;
 }
@@ -422,7 +422,7 @@
 {
     string path;

- if (!tc->getMemProxy().tryReadString(path, p->getSyscallArg(tc, index))) + if (!tc->getVirtProxy().tryReadString(path, p->getSyscallArg(tc, index)))
         return -EFAULT;

     // Adjust path for cwd and redirection
@@ -471,7 +471,7 @@
                   (char*)buf.bufferPtr());
     }

-    buf.copyOut(tc->getMemProxy());
+    buf.copyOut(tc->getVirtProxy());

     return (result == -1) ? -errno : result;
 }
@@ -488,7 +488,7 @@
 {
     string path;

- if (!tc->getMemProxy().tryReadString(path, p->getSyscallArg(tc, index))) + if (!tc->getVirtProxy().tryReadString(path, p->getSyscallArg(tc, index)))
         return -EFAULT;

     path = p->checkPathRedirect(path);
@@ -504,7 +504,7 @@
     string new_path;

     int index = 0;
-    auto &virt_mem = tc->getMemProxy();
+    auto &virt_mem = tc->getVirtProxy();
     if (!virt_mem.tryReadString(path, p->getSyscallArg(tc, index)))
         return -EFAULT;
     if (!virt_mem.tryReadString(new_path, p->getSyscallArg(tc, index)))
@@ -524,7 +524,7 @@
     string new_path;

     int index = 0;
-    auto &virt_mem = tc->getMemProxy();
+    auto &virt_mem = tc->getVirtProxy();
     if (!virt_mem.tryReadString(path, p->getSyscallArg(tc, index)))
         return -EFAULT;
     if (!virt_mem.tryReadString(new_path, p->getSyscallArg(tc, index)))
@@ -542,7 +542,7 @@
 {
     int index = 0;
     std::string path;
- if (!tc->getMemProxy().tryReadString(path, p->getSyscallArg(tc, index))) + if (!tc->getVirtProxy().tryReadString(path, p->getSyscallArg(tc, index)))
         return -EFAULT;

     path = p->checkPathRedirect(path);
@@ -558,13 +558,17 @@
     string old_name;

     int index = 0;
- if (!tc->getMemProxy().tryReadString(old_name, p->getSyscallArg(tc, index)))
+    if (!tc->getVirtProxy().tryReadString(
+                old_name, p->getSyscallArg(tc, index))) {
         return -EFAULT;
+    }

     string new_name;

- if (!tc->getMemProxy().tryReadString(new_name, p->getSyscallArg(tc, index)))
+    if (!tc->getVirtProxy().tryReadString(
+                new_name, p->getSyscallArg(tc, index))) {
         return -EFAULT;
+    }

     // Adjust path for cwd and redirection
     old_name = p->checkPathRedirect(old_name);
@@ -580,7 +584,7 @@
     string path;

     int index = 0;
- if (!tc->getMemProxy().tryReadString(path, p->getSyscallArg(tc, index))) + if (!tc->getVirtProxy().tryReadString(path, p->getSyscallArg(tc, index)))
         return -EFAULT;

     off_t length = p->getSyscallArg(tc, index);
@@ -615,8 +619,10 @@
     int index = 0;
     string path;

- if (!tc->getMemProxy().tryReadString(path, process->getSyscallArg(tc, index)))
+    if (!tc->getVirtProxy().tryReadString(
+                path, process->getSyscallArg(tc, index))) {
         return -EFAULT;
+    }

     int64_t length = process->getSyscallArg(tc, index, 64);

@@ -668,7 +674,7 @@
     string path;

     int index = 0;
- if (!tc->getMemProxy().tryReadString(path, p->getSyscallArg(tc, index))) + if (!tc->getVirtProxy().tryReadString(path, p->getSyscallArg(tc, index)))
         return -EFAULT;

     /* XXX endianess */
@@ -885,7 +891,7 @@
     int *buf_ptr = (int*)tgt_handle.bufferPtr();
     buf_ptr[0] = tgt_fds[0];
     buf_ptr[1] = tgt_fds[1];
-    tgt_handle.copyOut(tc->getMemProxy());
+    tgt_handle.copyOut(tc->getVirtProxy());
     return 0;
 }

@@ -1062,7 +1068,7 @@
            int index)
 {
     string path;
- if (!tc->getMemProxy().tryReadString(path, p->getSyscallArg(tc, index))) + if (!tc->getVirtProxy().tryReadString(path, p->getSyscallArg(tc, index)))
         return -EFAULT;

     // Adjust path for cwd and redirection
@@ -1085,7 +1091,7 @@
 {
     int index = 0;
     std::string path;
- if (!tc->getMemProxy().tryReadString(path, p->getSyscallArg(tc, index))) + if (!tc->getVirtProxy().tryReadString(path, p->getSyscallArg(tc, index)))
         return -EFAULT;

     path = p->checkPathRedirect(path);
@@ -1101,7 +1107,7 @@
 {
     int index = 0;
     std::string path;
- if (!tc->getMemProxy().tryReadString(path, p->getSyscallArg(tc, index))) + if (!tc->getVirtProxy().tryReadString(path, p->getSyscallArg(tc, index)))
         return -EFAULT;

     std::string tgt_cwd;
@@ -1128,7 +1134,7 @@
 {
     int index = 0;
     std::string path;
- if (!tc->getMemProxy().tryReadString(path, p->getSyscallArg(tc, index))) + if (!tc->getVirtProxy().tryReadString(path, p->getSyscallArg(tc, index)))
         return -EFAULT;

     path = p->checkPathRedirect(path);
@@ -1176,7 +1182,7 @@
         traversed += host_reclen;
     }

-    buf_arg.copyOut(tc->getMemProxy());
+    buf_arg.copyOut(tc->getVirtProxy());
     return status;
 }
 #endif
@@ -1237,7 +1243,7 @@
     int addrlen = p->getSyscallArg(tc, index);

     BufferArg bufSock(buf_ptr, addrlen);
-    bufSock.copyIn(tc->getMemProxy());
+    bufSock.copyIn(tc->getVirtProxy());

auto sfdp = std::dynamic_pointer_cast<SocketFDEntry>((*p->fds)[tgt_fd]);
     if (!sfdp)
@@ -1277,7 +1283,7 @@
     int addrlen = p->getSyscallArg(tc, index);

     BufferArg addr(buf_ptr, addrlen);
-    addr.copyIn(tc->getMemProxy());
+    addr.copyIn(tc->getVirtProxy());

auto sfdp = std::dynamic_pointer_cast<SocketFDEntry>((*p->fds)[tgt_fd]);
     if (!sfdp)
@@ -1315,14 +1321,14 @@
     if (addrlenPtr != 0) {
         // Read address length parameter.
         BufferArg addrlenBuf(addrlenPtr, sizeof(socklen_t));
-        addrlenBuf.copyIn(tc->getMemProxy());
+        addrlenBuf.copyIn(tc->getVirtProxy());
         addrLen = *((socklen_t *)addrlenBuf.bufferPtr());
     }

     struct sockaddr sa, *sap = NULL;
     if (addrLen != 0) {
         BufferArg addrBuf(addrPtr, addrLen);
-        addrBuf.copyIn(tc->getMemProxy());
+        addrBuf.copyIn(tc->getVirtProxy());
         memcpy(&sa, (struct sockaddr *)addrBuf.bufferPtr(),
                sizeof(struct sockaddr));
         sap = &sa;
@@ -1336,20 +1342,20 @@
         return -errno;

     // Pass the received data out.
-    bufrBuf.copyOut(tc->getMemProxy());
+    bufrBuf.copyOut(tc->getVirtProxy());

     // Copy address to addrPtr and pass it on.
     if (sap != NULL) {
         BufferArg addrBuf(addrPtr, addrLen);
         memcpy(addrBuf.bufferPtr(), sap, sizeof(sa));
-        addrBuf.copyOut(tc->getMemProxy());
+        addrBuf.copyOut(tc->getVirtProxy());
     }

     // Copy len to addrlenPtr and pass it on.
     if (addrLen != 0) {
         BufferArg addrlenBuf(addrlenPtr, sizeof(socklen_t));
         *(socklen_t *)addrlenBuf.bufferPtr() = addrLen;
-        addrlenBuf.copyOut(tc->getMemProxy());
+        addrlenBuf.copyOut(tc->getVirtProxy());
     }

     return recvd_size;
@@ -1373,13 +1379,13 @@

     // Reserve buffer space.
     BufferArg bufrBuf(bufrPtr, bufrLen);
-    bufrBuf.copyIn(tc->getMemProxy());
+    bufrBuf.copyIn(tc->getVirtProxy());

     struct sockaddr sa, *sap = nullptr;
     memset(&sa, 0, sizeof(sockaddr));
     if (addrLen != 0) {
         BufferArg addrBuf(addrPtr, addrLen);
-        addrBuf.copyIn(tc->getMemProxy());
+        addrBuf.copyIn(tc->getVirtProxy());
         memcpy(&sa, (sockaddr*)addrBuf.bufferPtr(), addrLen);
         sap = &sa;
     }
@@ -1428,7 +1434,7 @@
      * copy every field from the structures into our BufferArg classes.
      */
     BufferArg msgBuf(msgPtr, sizeof(struct msghdr));
-    msgBuf.copyIn(tc->getMemProxy());
+    msgBuf.copyIn(tc->getVirtProxy());
     struct msghdr *msgHdr = (struct msghdr *)msgBuf.bufferPtr();

     /**
@@ -1448,7 +1454,7 @@
     if (msgHdr->msg_name) {
         /*1*/msg_name_phold = (Addr)msgHdr->msg_name;
         /*2*/nameBuf = new BufferArg(msg_name_phold, msgHdr->msg_namelen);
-        /*3*/nameBuf->copyIn(tc->getMemProxy());
+        /*3*/nameBuf->copyIn(tc->getVirtProxy());
         /*4*/msgHdr->msg_name = nameBuf->bufferPtr();
     }

@@ -1468,14 +1474,14 @@
         /*1*/msg_iov_phold = (Addr)msgHdr->msg_iov;
         /*2*/iovBuf = new BufferArg(msg_iov_phold, msgHdr->msg_iovlen *
                                     sizeof(struct iovec));
-        /*3*/iovBuf->copyIn(tc->getMemProxy());
+        /*3*/iovBuf->copyIn(tc->getVirtProxy());
         for (int i = 0; i < msgHdr->msg_iovlen; i++) {
             if (((struct iovec *)iovBuf->bufferPtr())[i].iov_base) {
                 /*1*/iovec_base_phold[i] =
(Addr)((struct iovec *)iovBuf->bufferPtr())[i].iov_base;
                 /*2*/iovecBuf[i] = new BufferArg(iovec_base_phold[i],
                      ((struct iovec *)iovBuf->bufferPtr())[i].iov_len);
-                /*3*/iovecBuf[i]->copyIn(tc->getMemProxy());
+                /*3*/iovecBuf[i]->copyIn(tc->getVirtProxy());
                 /*4*/((struct iovec *)iovBuf->bufferPtr())[i].iov_base =
                      iovecBuf[i]->bufferPtr();
             }
@@ -1491,7 +1497,7 @@
         /*1*/msg_control_phold = (Addr)msgHdr->msg_control;
         /*2*/controlBuf = new BufferArg(msg_control_phold,
CMSG_ALIGN(msgHdr->msg_controllen));
-        /*3*/controlBuf->copyIn(tc->getMemProxy());
+        /*3*/controlBuf->copyIn(tc->getVirtProxy());
         /*4*/msgHdr->msg_control = controlBuf->bufferPtr();
     }

@@ -1501,7 +1507,7 @@
         return -errno;

     if (msgHdr->msg_name) {
-        nameBuf->copyOut(tc->getMemProxy());
+        nameBuf->copyOut(tc->getVirtProxy());
         delete(nameBuf);
         msgHdr->msg_name = (void *)msg_name_phold;
     }
@@ -1509,24 +1515,24 @@
     if (msgHdr->msg_iov) {
         for (int i = 0; i< msgHdr->msg_iovlen; i++) {
             if (((struct iovec *)iovBuf->bufferPtr())[i].iov_base) {
-                iovecBuf[i]->copyOut(tc->getMemProxy());
+                iovecBuf[i]->copyOut(tc->getVirtProxy());
                 delete iovecBuf[i];
                 ((struct iovec *)iovBuf->bufferPtr())[i].iov_base =
                 (void *)iovec_base_phold[i];
             }
         }
-        iovBuf->copyOut(tc->getMemProxy());
+        iovBuf->copyOut(tc->getVirtProxy());
         delete iovBuf;
         msgHdr->msg_iov = (struct iovec *)msg_iov_phold;
     }

     if (msgHdr->msg_control) {
-        controlBuf->copyOut(tc->getMemProxy());
+        controlBuf->copyOut(tc->getVirtProxy());
         delete(controlBuf);
         msgHdr->msg_control = (void *)msg_control_phold;
     }

-    msgBuf.copyOut(tc->getMemProxy());
+    msgBuf.copyOut(tc->getVirtProxy());

     return recvd_size;
 }
@@ -1548,7 +1554,7 @@
      * Reserve buffer space.
      */
     BufferArg msgBuf(msgPtr, sizeof(struct msghdr));
-    msgBuf.copyIn(tc->getMemProxy());
+    msgBuf.copyIn(tc->getVirtProxy());
     struct msghdr msgHdr = *((struct msghdr *)msgBuf.bufferPtr());

     /**
@@ -1557,7 +1563,7 @@
      */
     struct iovec *iovPtr = msgHdr.msg_iov;
BufferArg iovBuf((Addr)iovPtr, sizeof(struct iovec) * msgHdr.msg_iovlen);
-    iovBuf.copyIn(tc->getMemProxy());
+    iovBuf.copyIn(tc->getVirtProxy());
     struct iovec *iov = (struct iovec *)iovBuf.bufferPtr();
     msgHdr.msg_iov = iov;

@@ -1577,7 +1583,7 @@
     for (int iovIndex = 0 ; iovIndex < msgHdr.msg_iovlen; iovIndex++) {
         Addr basePtr = (Addr) iov[iovIndex].iov_base;
bufferArray[iovIndex] = new BufferArg(basePtr, iov[iovIndex].iov_len);
-        bufferArray[iovIndex]->copyIn(tc->getMemProxy());
+        bufferArray[iovIndex]->copyIn(tc->getVirtProxy());
         iov[iovIndex].iov_base = bufferArray[iovIndex]->bufferPtr();
     }

@@ -1632,12 +1638,12 @@
     // copy val to valPtr and pass it on
     BufferArg valBuf(valPtr, sizeof(val));
     memcpy(valBuf.bufferPtr(), &val, sizeof(val));
-    valBuf.copyOut(tc->getMemProxy());
+    valBuf.copyOut(tc->getVirtProxy());

     // copy len to lenPtr and pass  it on
     BufferArg lenBuf(lenPtr, sizeof(len));
     memcpy(lenBuf.bufferPtr(), &len, sizeof(len));
-    lenBuf.copyOut(tc->getMemProxy());
+    lenBuf.copyOut(tc->getVirtProxy());

     return status;
 }
@@ -1660,7 +1666,7 @@

     // Read in the value of len from the passed pointer.
     BufferArg lenBuf(lenPtr, sizeof(socklen_t));
-    lenBuf.copyIn(tc->getMemProxy());
+    lenBuf.copyIn(tc->getVirtProxy());
     socklen_t len = *(socklen_t *)lenBuf.bufferPtr();

     struct sockaddr sa;
@@ -1672,11 +1678,11 @@
     // Copy address to addrPtr and pass it on.
     BufferArg addrBuf(addrPtr, sizeof(sa));
     memcpy(addrBuf.bufferPtr(), &sa, sizeof(sa));
-    addrBuf.copyOut(tc->getMemProxy());
+    addrBuf.copyOut(tc->getVirtProxy());

     // Copy len to lenPtr and pass  it on.
     *(socklen_t *)lenBuf.bufferPtr() = len;
-    lenBuf.copyOut(tc->getMemProxy());
+    lenBuf.copyOut(tc->getVirtProxy());

     return status;
 }
@@ -1695,7 +1701,7 @@
     int sim_fd = sfdp->getSimFD();

     BufferArg bufAddrlen(addrlenPtr, sizeof(unsigned));
-    bufAddrlen.copyIn(tc->getMemProxy());
+    bufAddrlen.copyIn(tc->getVirtProxy());
     BufferArg bufSock(sockAddrPtr, *(unsigned *)bufAddrlen.bufferPtr());

     int retval = getpeername(sim_fd,
@@ -1703,8 +1709,8 @@
                              (unsigned *)bufAddrlen.bufferPtr());

     if (retval != -1) {
-        bufSock.copyOut(tc->getMemProxy());
-        bufAddrlen.copyOut(tc->getMemProxy());
+        bufSock.copyOut(tc->getVirtProxy());
+        bufAddrlen.copyOut(tc->getVirtProxy());
     }

     return (retval == -1) ? -errno : retval;
@@ -1721,7 +1727,7 @@
     socklen_t len = p->getSyscallArg(tc, index);

     BufferArg valBuf(valPtr, len);
-    valBuf.copyIn(tc->getMemProxy());
+    valBuf.copyIn(tc->getVirtProxy());

auto sfdp = std::dynamic_pointer_cast<SocketFDEntry>((*p->fds)[tgt_fd]);
     if (!sfdp)
diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh
index 02c849b..91ea141 100644
--- a/src/sim/syscall_emul.hh
+++ b/src/sim/syscall_emul.hh
@@ -424,7 +424,7 @@
     if (OS::TGT_FUTEX_WAIT == op || OS::TGT_FUTEX_WAIT_BITSET == op) {
         // Ensure futex system call accessed atomically.
         BufferArg buf(uaddr, sizeof(int));
-        buf.copyIn(tc->getMemProxy());
+        buf.copyIn(tc->getVirtProxy());
         int mem_val = *(int*)buf.bufferPtr();

         /*
@@ -451,7 +451,7 @@

         // Ensure futex system call accessed atomically.
         BufferArg buf(uaddr, sizeof(int));
-        buf.copyIn(tc->getMemProxy());
+        buf.copyIn(tc->getVirtProxy());
         int mem_val = *(int*)buf.bufferPtr();
         /*
          * For CMP_REQUEUE, the whole operation is only started only if
@@ -484,7 +484,7 @@
          */
         // get value from simulated-space
         BufferArg buf(uaddr2, sizeof(int));
-        buf.copyIn(tc->getMemProxy());
+        buf.copyIn(tc->getVirtProxy());
         int oldval = *(int*)buf.bufferPtr();
         int newval = oldval;
         // extract op, oparg, cmp, cmparg from val3
@@ -508,7 +508,7 @@
             newval ^= wake_oparg;
         // copy updated value back to simulated-space
         *(int*)buf.bufferPtr() = newval;
-        buf.copyOut(tc->getMemProxy());
+        buf.copyOut(tc->getVirtProxy());
         // perform the first wake-up
         int woken1 = futex_map.wakeup(uaddr, process->tgid(), val);
         int woken2 = 0;
@@ -774,20 +774,20 @@
           case SIOCGIFCONF: {
             Addr conf_addr = p->getSyscallArg(tc, index);
             BufferArg conf_arg(conf_addr, sizeof(ifconf));
-            conf_arg.copyIn(tc->getMemProxy());
+            conf_arg.copyIn(tc->getVirtProxy());

             ifconf *conf = (ifconf*)conf_arg.bufferPtr();
             Addr ifc_buf_addr = (Addr)conf->ifc_buf;
             BufferArg ifc_buf_arg(ifc_buf_addr, conf->ifc_len);
-            ifc_buf_arg.copyIn(tc->getMemProxy());
+            ifc_buf_arg.copyIn(tc->getVirtProxy());

             conf->ifc_buf = (char*)ifc_buf_arg.bufferPtr();

             status = ioctl(sfdp->getSimFD(), req, conf_arg.bufferPtr());
             if (status != -1) {
                 conf->ifc_buf = (char*)ifc_buf_addr;
-                ifc_buf_arg.copyOut(tc->getMemProxy());
-                conf_arg.copyOut(tc->getMemProxy());
+                ifc_buf_arg.copyOut(tc->getVirtProxy());
+                conf_arg.copyOut(tc->getVirtProxy());
             }

             return status;
@@ -804,11 +804,11 @@
           case SIOCGIFMTU: {
             Addr req_addr = p->getSyscallArg(tc, index);
             BufferArg req_arg(req_addr, sizeof(ifreq));
-            req_arg.copyIn(tc->getMemProxy());
+            req_arg.copyIn(tc->getVirtProxy());

             status = ioctl(sfdp->getSimFD(), req, req_arg.bufferPtr());
             if (status != -1)
-                req_arg.copyOut(tc->getMemProxy());
+                req_arg.copyOut(tc->getVirtProxy());
             return status;
           }
         }
@@ -843,7 +843,7 @@
      * string from that memory space into the host's working memory space.
      */
     std::string path;
- if (!tc->getMemProxy().tryReadString(path, p->getSyscallArg(tc, index))) + if (!tc->getVirtProxy().tryReadString(path, p->getSyscallArg(tc, index)))
         return -EFAULT;

 #ifdef __CYGWIN32__
@@ -1054,7 +1054,7 @@

     std::string old_name;

-    if (!tc->getMemProxy().tryReadString(old_name,
+    if (!tc->getVirtProxy().tryReadString(old_name,
process->getSyscallArg(tc, index)))
         return -EFAULT;

@@ -1064,7 +1064,7 @@

     std::string new_name;

-    if (!tc->getMemProxy().tryReadString(new_name,
+    if (!tc->getVirtProxy().tryReadString(new_name,
process->getSyscallArg(tc, index)))
         return -EFAULT;

@@ -1091,7 +1091,7 @@
     sysinfo->totalram = process->system->memSize();
     sysinfo->mem_unit = 1;

-    sysinfo.copyOut(tc->getMemProxy());
+    sysinfo.copyOut(tc->getVirtProxy());

     return 0;
 }
@@ -1105,7 +1105,7 @@
     std::string path;

     int index = 0;
-    if (!tc->getMemProxy().tryReadString(path,
+    if (!tc->getVirtProxy().tryReadString(path,
                 process->getSyscallArg(tc, index))) {
         return -EFAULT;
     }
@@ -1137,7 +1137,7 @@
     int tmout = p->getSyscallArg(tc, index);

     BufferArg fdsBuf(fdsPtr, sizeof(struct pollfd) * nfds);
-    fdsBuf.copyIn(tc->getMemProxy());
+    fdsBuf.copyIn(tc->getVirtProxy());

     /**
      * Record the target file descriptors in a local variable. We need to
@@ -1197,7 +1197,7 @@
      * Copy out the pollfd struct because the host may have updated fields
      * in the structure.
      */
-    fdsBuf.copyOut(tc->getMemProxy());
+    fdsBuf.copyOut(tc->getVirtProxy());

     return status;
 }
@@ -1311,7 +1311,7 @@
     std::string path;

     int index = 0;
-    if (!tc->getMemProxy().tryReadString(path,
+    if (!tc->getVirtProxy().tryReadString(path,
                 process->getSyscallArg(tc, index))) {
         return -EFAULT;
     }
@@ -1326,7 +1326,7 @@
     if (result < 0)
         return -errno;

-    copyOutStatBuf<OS>(tc->getMemProxy(), bufPtr, &hostBuf);
+    copyOutStatBuf<OS>(tc->getVirtProxy(), bufPtr, &hostBuf);

     return 0;
 }
@@ -1341,7 +1341,7 @@
     std::string path;

     int index = 0;
-    if (!tc->getMemProxy().tryReadString(path,
+    if (!tc->getVirtProxy().tryReadString(path,
                 process->getSyscallArg(tc, index)))
         return -EFAULT;
     Addr bufPtr = process->getSyscallArg(tc, index);
@@ -1360,7 +1360,7 @@
     if (result < 0)
         return -errno;

-    copyOutStat64Buf<OS>(tc->getMemProxy(), bufPtr, &hostBuf);
+    copyOutStat64Buf<OS>(tc->getVirtProxy(), bufPtr, &hostBuf);

     return 0;
 }
@@ -1378,7 +1378,7 @@
         warn("fstatat64: first argument not AT_FDCWD; unlikely to work");

     std::string path;
-    if (!tc->getMemProxy().tryReadString(path,
+    if (!tc->getVirtProxy().tryReadString(path,
                 process->getSyscallArg(tc, index)))
         return -EFAULT;
     Addr bufPtr = process->getSyscallArg(tc, index);
@@ -1397,7 +1397,7 @@
     if (result < 0)
         return -errno;

-    copyOutStat64Buf<OS>(tc->getMemProxy(), bufPtr, &hostBuf);
+    copyOutStat64Buf<OS>(tc->getVirtProxy(), bufPtr, &hostBuf);

     return 0;
 }
@@ -1428,7 +1428,7 @@
     if (result < 0)
         return -errno;

- copyOutStat64Buf<OS>(tc->getMemProxy(), bufPtr, &hostBuf, (sim_fd == 1)); + copyOutStat64Buf<OS>(tc->getVirtProxy(), bufPtr, &hostBuf, (sim_fd == 1));

     return 0;
 }
@@ -1443,7 +1443,7 @@
     std::string path;

     int index = 0;
-    if (!tc->getMemProxy().tryReadString(path,
+    if (!tc->getVirtProxy().tryReadString(path,
                 process->getSyscallArg(tc, index))) {
         return -EFAULT;
     }
@@ -1458,7 +1458,7 @@
     if (result < 0)
         return -errno;

-    copyOutStatBuf<OS>(tc->getMemProxy(), bufPtr, &hostBuf);
+    copyOutStatBuf<OS>(tc->getVirtProxy(), bufPtr, &hostBuf);

     return 0;
 }
@@ -1472,7 +1472,7 @@
     std::string path;

     int index = 0;
-    if (!tc->getMemProxy().tryReadString(path,
+    if (!tc->getVirtProxy().tryReadString(path,
                 process->getSyscallArg(tc, index))) {
         return -EFAULT;
     }
@@ -1492,7 +1492,7 @@
     if (result < 0)
         return -errno;

-    copyOutStat64Buf<OS>(tc->getMemProxy(), bufPtr, &hostBuf);
+    copyOutStat64Buf<OS>(tc->getVirtProxy(), bufPtr, &hostBuf);

     return 0;
 }
@@ -1519,7 +1519,7 @@
     if (result < 0)
         return -errno;

-    copyOutStatBuf<OS>(tc->getMemProxy(), bufPtr, &hostBuf, (sim_fd == 1));
+ copyOutStatBuf<OS>(tc->getVirtProxy(), bufPtr, &hostBuf, (sim_fd == 1));

     return 0;
 }
@@ -1536,7 +1536,7 @@
     std::string path;

     int index = 0;
-    if (!tc->getMemProxy().tryReadString(path,
+    if (!tc->getVirtProxy().tryReadString(path,
                 process->getSyscallArg(tc, index))) {
         return -EFAULT;
     }
@@ -1551,7 +1551,7 @@
     if (result < 0)
         return -errno;

-    copyOutStatfsBuf<OS>(tc->getMemProxy(), bufPtr, &hostBuf);
+    copyOutStatfsBuf<OS>(tc->getVirtProxy(), bufPtr, &hostBuf);
 #endif
     return 0;
 }
@@ -1638,7 +1638,7 @@
         BufferArg ptidBuf(ptidPtr, sizeof(long));
         long *ptid = (long *)ptidBuf.bufferPtr();
         *ptid = cp->pid();
-        ptidBuf.copyOut(tc->getMemProxy());
+        ptidBuf.copyOut(tc->getVirtProxy());
     }

     if (flags & OS::TGT_CLONE_THREAD) {
@@ -1659,7 +1659,7 @@
         BufferArg ctidBuf(ctidPtr, sizeof(long));
         long *ctid = (long *)ctidBuf.bufferPtr();
         *ctid = cp->pid();
-        ctidBuf.copyOut(ctc->getMemProxy());
+        ctidBuf.copyOut(ctc->getVirtProxy());
     }

     if (flags & OS::TGT_CLONE_CHILD_CLEARTID)
@@ -1714,7 +1714,7 @@
     if (result < 0)
         return -errno;

-    copyOutStatfsBuf<OS>(tc->getMemProxy(), bufPtr, &hostBuf);
+    copyOutStatfsBuf<OS>(tc->getVirtProxy(), bufPtr, &hostBuf);

     return 0;
 }
@@ -1732,7 +1732,7 @@
         return -EBADF;
     int sim_fd = ffdp->getSimFD();

-    PortProxy &prox = tc->getMemProxy();
+    PortProxy &prox = tc->getVirtProxy();
     uint64_t tiov_base = p->getSyscallArg(tc, index);
     size_t count = p->getSyscallArg(tc, index);
     typename OS::tgt_iovec tiov[count];
@@ -1771,7 +1771,7 @@
         return -EBADF;
     int sim_fd = hbfdp->getSimFD();

-    PortProxy &prox = tc->getMemProxy();
+    PortProxy &prox = tc->getVirtProxy();
     uint64_t tiov_base = p->getSyscallArg(tc, index);
     size_t count = p->getSyscallArg(tc, index);
     struct iovec hiov[count];
@@ -1909,7 +1909,7 @@
     p->allocateMem(start, length, clobber);

     // Transfer content into target address space.
-    PortProxy &tp = tc->getMemProxy();
+    PortProxy &tp = tc->getVirtProxy();
     if (tgt_flags & OS::TGT_MAP_ANONYMOUS) {
// In general, we should zero the mapped area for anonymous mappings,
         // with something like:
@@ -1989,7 +1989,7 @@
     int sim_fd = ffdp->getSimFD();

     BufferArg bufArg(bufPtr, nbytes);
-    bufArg.copyIn(tc->getMemProxy());
+    bufArg.copyIn(tc->getVirtProxy());

     int bytes_written = pwrite(sim_fd, bufArg.bufferPtr(), nbytes, offset);

@@ -2043,7 +2043,7 @@
         break;
     }

-    rlp.copyOut(tc->getMemProxy());
+    rlp.copyOut(tc->getVirtProxy());
     return 0;
 }

@@ -2084,7 +2084,7 @@
             return -EINVAL;
             break;
         }
-        rlp.copyOut(tc->getMemProxy());
+        rlp.copyOut(tc->getVirtProxy());
     }
     return 0;
 }
@@ -2103,7 +2103,7 @@
     tp->tv_sec = TheISA::htog(tp->tv_sec);
     tp->tv_nsec = TheISA::htog(tp->tv_nsec);

-    tp.copyOut(tc->getMemProxy());
+    tp.copyOut(tc->getVirtProxy());

     return 0;
 }
@@ -2120,7 +2120,7 @@
     tp->tv_sec = 0;
     tp->tv_nsec = 1;

-    tp.copyOut(tc->getMemProxy());
+    tp.copyOut(tc->getVirtProxy());

     return 0;
 }
@@ -2139,7 +2139,7 @@
     tp->tv_sec = TheISA::htog(tp->tv_sec);
     tp->tv_usec = TheISA::htog(tp->tv_usec);

-    tp.copyOut(tc->getMemProxy());
+    tp.copyOut(tc->getVirtProxy());

     return 0;
 }
@@ -2154,14 +2154,14 @@
     std::string path;

     int index = 0;
-    if (!tc->getMemProxy().tryReadString(path,
+    if (!tc->getVirtProxy().tryReadString(path,
                 process->getSyscallArg(tc, index))) {
         return -EFAULT;
     }

     TypedBufferArg<typename OS::timeval [2]>
         tp(process->getSyscallArg(tc, index));
-    tp.copyIn(tc->getMemProxy());
+    tp.copyIn(tc->getVirtProxy());

     struct timeval hostTimeval[2];
     for (int i = 0; i < 2; ++i) {
@@ -2188,7 +2188,7 @@

     int index = 0;
     std::string path;
-    PortProxy & mem_proxy = tc->getMemProxy();
+    PortProxy & mem_proxy = tc->getVirtProxy();
     if (!mem_proxy.tryReadString(path, p->getSyscallArg(tc, index)))
         return -EFAULT;

@@ -2318,7 +2318,7 @@
              who);
     }

-    rup.copyOut(tc->getMemProxy());
+    rup.copyOut(tc->getVirtProxy());

     return 0;
 }
@@ -2343,7 +2343,7 @@
     bufp->tms_utime = TheISA::htog(bufp->tms_utime);

     // Write back
-    bufp.copyOut(tc->getMemProxy());
+    bufp.copyOut(tc->getVirtProxy());

     // Return clock ticks since system boot
     return clocks;
@@ -2363,7 +2363,7 @@
     if (taddr != 0) {
         typename OS::time_t t = sec;
         t = TheISA::htog(t);
-        PortProxy &p = tc->getMemProxy();
+        PortProxy &p = tc->getVirtProxy();
         p.writeBlob(taddr, &t, (int)sizeof(typename OS::time_t));
     }
     return sec;
@@ -2458,7 +2458,7 @@
     fds[0] = p->fds->allocFD(sfdp1);
auto sfdp2 = std::make_shared<SocketFDEntry>(fds[1], domain, type, prot);
     fds[1] = p->fds->allocFD(sfdp2);
-    svBuf.copyOut(tc->getMemProxy());
+    svBuf.copyOut(tc->getVirtProxy());

     return status;
 }
@@ -2497,11 +2497,11 @@
      * Copy in the fd_set from the target.
      */
     if (fds_read_ptr)
-        rd_t.copyIn(tc->getMemProxy());
+        rd_t.copyIn(tc->getVirtProxy());
     if (fds_writ_ptr)
-        wr_t.copyIn(tc->getMemProxy());
+        wr_t.copyIn(tc->getVirtProxy());
     if (fds_excp_ptr)
-        ex_t.copyIn(tc->getMemProxy());
+        ex_t.copyIn(tc->getVirtProxy());

     /**
      * We need to translate the target file descriptor set into a host file
@@ -2647,13 +2647,13 @@
     }

     if (fds_read_ptr)
-        rd_t.copyOut(tc->getMemProxy());
+        rd_t.copyOut(tc->getVirtProxy());
     if (fds_writ_ptr)
-        wr_t.copyOut(tc->getMemProxy());
+        wr_t.copyOut(tc->getVirtProxy());
     if (fds_excp_ptr)
-        ex_t.copyOut(tc->getMemProxy());
+        ex_t.copyOut(tc->getVirtProxy());
     if (time_val_ptr)
-        tp.copyOut(tc->getMemProxy());
+        tp.copyOut(tc->getVirtProxy());

     return retval;
 }
@@ -2683,7 +2683,7 @@
     int bytes_read = read(sim_fd, buf_arg.bufferPtr(), nbytes);

     if (bytes_read > 0)
-        buf_arg.copyOut(tc->getMemProxy());
+        buf_arg.copyOut(tc->getVirtProxy());

     return (bytes_read == -1) ? -errno : bytes_read;
 }
@@ -2703,7 +2703,7 @@
     int sim_fd = hbfdp->getSimFD();

     BufferArg buf_arg(buf_ptr, nbytes);
-    buf_arg.copyIn(tc->getMemProxy());
+    buf_arg.copyIn(tc->getVirtProxy());

     struct pollfd pfd;
     pfd.fd = sim_fd;
@@ -2782,7 +2782,7 @@
     const int EXITED = 0;
     BufferArg statusBuf(statPtr, sizeof(int));
     *(int *)statusBuf.bufferPtr() = EXITED;
-    statusBuf.copyOut(tc->getMemProxy());
+    statusBuf.copyOut(tc->getVirtProxy());

     // Return the child PID.
     pid_t retval = iter->sender->pid();
@@ -2825,14 +2825,14 @@

     if (lenPtr) {
         lenBufPtr = new BufferArg(lenPtr, sizeof(socklen_t));
-        lenBufPtr->copyIn(tc->getMemProxy());
+        lenBufPtr->copyIn(tc->getVirtProxy());
         memcpy(&addrLen, (socklen_t *)lenBufPtr->bufferPtr(),
                sizeof(socklen_t));
     }

     if (addrPtr) {
         addrBufPtr = new BufferArg(addrPtr, sizeof(struct sockaddr));
-        addrBufPtr->copyIn(tc->getMemProxy());
+        addrBufPtr->copyIn(tc->getVirtProxy());
         memcpy(&sa, (struct sockaddr *)addrBufPtr->bufferPtr(),
                sizeof(struct sockaddr));
     }
@@ -2844,13 +2844,13 @@

     if (addrPtr) {
         memcpy(addrBufPtr->bufferPtr(), &sa, sizeof(sa));
-        addrBufPtr->copyOut(tc->getMemProxy());
+        addrBufPtr->copyOut(tc->getVirtProxy());
         delete(addrBufPtr);
     }

     if (lenPtr) {
         *(socklen_t *)lenBufPtr->bufferPtr() = addrLen;
-        lenBufPtr->copyOut(tc->getMemProxy());
+        lenBufPtr->copyOut(tc->getVirtProxy());
         delete(lenBufPtr);
     }


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/18581
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Idd83c6b899f9343795075b030ccbc723a79e52a4
Gerrit-Change-Number: 18581
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <gabebl...@google.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to