[gem5-dev] Change in gem5/gem5[master]: sim-se: add a faux-filesystem

2019-04-25 Thread Brandon Potter (Gerrit)
Brandon Potter has submitted this change and it was merged. (  
https://gem5-review.googlesource.com/c/public/gem5/+/12119 )


Change subject: sim-se: add a faux-filesystem
..

sim-se: add a faux-filesystem

This change introduces the concept of a faux-filesystem.
The faux-filesystem creates a directory structure in m5out
(or whatever output dir the user specifies) where system calls
may be redirected.

This is useful to avoid non-determinism when reading files
with varying path names (e.g., variations from run-to-run if
the simulation is scheduled on a cluster where paths may change).

Also, this changeset allows circumventing host pseudofiles which
have information specific to the host processor (such as cache
hierarchy or processor information). Bypassing host pseudofiles
can be useful when executing runtimes in the absence of an
operating system kernel since runtimes may try to query standard
files (i.e. /proc or /sys) which are not relevant to an
application executing in syscall emulation mode.

Change-Id: I90821b3b403168b904a662fa98b85def1628621c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/12119
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
A configs/common/FileSystemConfig.py
M configs/common/Options.py
M configs/example/se.py
A src/doc/se-files.txt
M src/kern/linux/linux.cc
M src/sim/Process.py
A src/sim/RedirectPath.py
M src/sim/SConscript
M src/sim/System.py
M src/sim/process.cc
M src/sim/process.hh
A src/sim/redirect_path.cc
A src/sim/redirect_path.hh
M src/sim/syscall_emul.cc
M src/sim/syscall_emul.hh
M src/sim/system.cc
M src/sim/system.hh
17 files changed, 755 insertions(+), 94 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/configs/common/FileSystemConfig.py  
b/configs/common/FileSystemConfig.py

new file mode 100644
index 000..561cfe6
--- /dev/null
+++ b/configs/common/FileSystemConfig.py
@@ -0,0 +1,175 @@
+# Copyright (c) 2015 Advanced Micro Devices, Inc.
+# All rights reserved
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met: redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer;
+# redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution;
+# neither the name of the copyright holders nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Authors: David Hashe
+
+from __future__ import print_function
+
+import m5
+from m5.objects import *
+from m5.util.convert import *
+
+import operator, os, platform, getpass
+from os import mkdir, makedirs, getpid, listdir, stat, access
+from pwd import getpwuid
+from os.path import join as joinpath
+from os.path import isdir
+from shutil import rmtree, copyfile
+
+def hex_mask(terms):
+dec_mask = reduce(operator.or_, [2**i for i in terms], 0)
+return "%08x" % dec_mask
+
+def file_append(path, contents):
+with open(joinpath(*path), 'a') as f:
+f.write(str(contents))
+
+def replace_tree(path):
+if isdir(path):
+rmtree(path)
+mkdir(path)
+
+def config_filesystem(options):
+fsdir = joinpath(m5.options.outdir, 'fs')
+replace_tree(fsdir)
+
+# Set up /proc
+procdir = joinpath(fsdir, 'proc')
+mkdir(procdir)
+
+for i in xrange(options.num_cpus):
+one_cpu = 'processor   : 0\n' + \
+  'vendor_id   : Generic\n'   + \
+  'cpu family  : 0\n' + \
+  'model   : 0\n' + \
+  'model name  : Generic\n'   + \
+  'stepping: 0\n' + \
+

[gem5-dev] Change in gem5/gem5[master]: sim-se: add a faux-filesystem

2019-04-25 Thread Brandon Potter (Gerrit)
Hello kokoro, Ciro Santilli, Alexandru Duțu, Anthony Gutierrez, Jason  
Lowe-Power,


I'd like you to reexamine a change. Please visit

https://gem5-review.googlesource.com/c/public/gem5/+/12119

to look at the new patch set (#21).

Change subject: sim-se: add a faux-filesystem
..

sim-se: add a faux-filesystem

This change introduces the concept of a faux-filesystem.
The faux-filesystem creates a directory structure in m5out
(or whatever output dir the user specifies) where system calls
may be redirected.

This is useful to avoid non-determinism when reading files
with varying path names (e.g., variations from run-to-run if
the simulation is scheduled on a cluster where paths may change).

Also, this changeset allows circumventing host pseudofiles which
have information specific to the host processor (such as cache
hierarchy or processor information). Bypassing host pseudofiles
can be useful when executing runtimes in the absence of an
operating system kernel since runtimes may try to query standard
files (i.e. /proc or /sys) which are not relevant to an
application executing in syscall emulation mode.

Change-Id: I90821b3b403168b904a662fa98b85def1628621c
---
A configs/common/FileSystemConfig.py
M configs/common/Options.py
M configs/example/se.py
A src/doc/se-files.txt
M src/kern/linux/linux.cc
M src/sim/Process.py
A src/sim/RedirectPath.py
M src/sim/SConscript
M src/sim/System.py
M src/sim/process.cc
M src/sim/process.hh
A src/sim/redirect_path.cc
A src/sim/redirect_path.hh
M src/sim/syscall_emul.cc
M src/sim/syscall_emul.hh
M src/sim/system.cc
M src/sim/system.hh
17 files changed, 755 insertions(+), 94 deletions(-)


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12119
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: I90821b3b403168b904a662fa98b85def1628621c
Gerrit-Change-Number: 12119
Gerrit-PatchSet: 21
Gerrit-Owner: Brandon Potter 
Gerrit-Reviewer: Alexandru Duțu 
Gerrit-Reviewer: Anthony Gutierrez 
Gerrit-Reviewer: Brandon Potter 
Gerrit-Reviewer: Ciro Santilli 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
Gerrit-CC: Andreas Sandberg 
Gerrit-CC: Giacomo Travaglini 
Gerrit-MessageType: newpatchset
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in gem5/gem5[master]: sim-se: add a faux-filesystem

2019-04-22 Thread Brandon Potter (Gerrit)
Hello Anthony Gutierrez, Jason Lowe-Power, Alexandru Duțu, kokoro, Ciro  
Santilli,


I'd like you to reexamine a change. Please visit

https://gem5-review.googlesource.com/c/public/gem5/+/12119

to look at the new patch set (#19).

Change subject: sim-se: add a faux-filesystem
..

sim-se: add a faux-filesystem

This change introduces the concept of a faux-filesystem.
The faux-filesystem creates a directory structure in m5out
(or whatever output dir the user specifies) where system calls
may be redirected.

This is useful to avoid non-determinism when reading files
with varying path names (e.g., variations from run-to-run if
the simulation is scheduled on a cluster where paths may change).

Also, this changeset allows circumventing host pseudofiles which
have information specific to the host processor (such as cache
hierarchy or processor information). Bypassing host pseudofiles
can be useful when executing runtimes in the absence of an
operating system kernel since runtimes may try to query standard
files (i.e. /proc or /sys) which are not relevant to an
application executing in syscall emulation mode.

Change-Id: I90821b3b403168b904a662fa98b85def1628621c
---
A configs/common/FileSystemConfig.py
M configs/common/Options.py
M configs/example/se.py
A src/doc/se-files.txt
M src/kern/linux/linux.cc
M src/sim/Process.py
A src/sim/RedirectPath.py
M src/sim/SConscript
M src/sim/System.py
M src/sim/process.cc
M src/sim/process.hh
A src/sim/redirect_path.cc
A src/sim/redirect_path.hh
M src/sim/syscall_emul.cc
M src/sim/syscall_emul.hh
M src/sim/system.cc
M src/sim/system.hh
17 files changed, 755 insertions(+), 94 deletions(-)


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12119
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: I90821b3b403168b904a662fa98b85def1628621c
Gerrit-Change-Number: 12119
Gerrit-PatchSet: 19
Gerrit-Owner: Brandon Potter 
Gerrit-Reviewer: Alexandru Duțu 
Gerrit-Reviewer: Anthony Gutierrez 
Gerrit-Reviewer: Brandon Potter 
Gerrit-Reviewer: Ciro Santilli 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
Gerrit-CC: Andreas Sandberg 
Gerrit-CC: Giacomo Travaglini 
Gerrit-MessageType: newpatchset
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in gem5/gem5[master]: sim-se: add a faux-filesystem

2019-04-18 Thread Alexandru Duțu (Gerrit)
Alexandru Duțu has uploaded a new patch set (#18) to the change originally  
created by Brandon Potter. (  
https://gem5-review.googlesource.com/c/public/gem5/+/12119 )


Change subject: sim-se: add a faux-filesystem
..

sim-se: add a faux-filesystem

This change introduces the concept of a faux-filesystem.
The faux-filesystem creates a directory structure in m5out
(or whatever output dir the user specifies) where system calls
may be redirected.

This is useful to avoid non-determinism when reading files
with varying path names (e.g., variations from run-to-run if
the simulation is scheduled on a cluster where paths may change).

Also, this changeset allows circumventing host pseudofiles which
have information specific to the host processor (such as cache
hierarchy or processor information). Bypassing host pseudofiles
can be useful when executing runtimes in the absence of an
operating system kernel since runtimes may try to query standard
files (i.e. /proc or /sys) which are not relevant to an
application executing in syscall emulation mode.

Change-Id: I90821b3b403168b904a662fa98b85def1628621c
---
A configs/common/FileSystemConfig.py
M configs/common/Options.py
M configs/example/se.py
A src/doc/se-files.txt
M src/kern/linux/linux.cc
M src/sim/Process.py
A src/sim/RedirectPath.py
M src/sim/SConscript
M src/sim/System.py
M src/sim/process.cc
M src/sim/process.hh
A src/sim/redirect_path.cc
A src/sim/redirect_path.hh
M src/sim/syscall_emul.cc
M src/sim/syscall_emul.hh
M src/sim/system.cc
M src/sim/system.hh
17 files changed, 755 insertions(+), 94 deletions(-)


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12119
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: I90821b3b403168b904a662fa98b85def1628621c
Gerrit-Change-Number: 12119
Gerrit-PatchSet: 18
Gerrit-Owner: Brandon Potter 
Gerrit-Reviewer: Alexandru Duțu 
Gerrit-Reviewer: Anthony Gutierrez 
Gerrit-Reviewer: Brandon Potter 
Gerrit-Reviewer: Ciro Santilli 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
Gerrit-CC: Andreas Sandberg 
Gerrit-CC: Giacomo Travaglini 
Gerrit-MessageType: newpatchset
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in gem5/gem5[master]: sim-se: add a faux-filesystem

2019-04-18 Thread Brandon Potter (Gerrit)

Hello Anthony Gutierrez, Jason Lowe-Power, Ciro Santilli,

I'd like you to reexamine a change. Please visit

https://gem5-review.googlesource.com/c/public/gem5/+/12119

to look at the new patch set (#17).

Change subject: sim-se: add a faux-filesystem
..

sim-se: add a faux-filesystem

This change introduces the concept of a faux-filesystem.
The faux-filesystem creates a directory structure in m5out
(or whatever output dir the user specifies) where system calls
may be redirected.

This is useful to avoid non-determinism when reading files
with varying path names (e.g., variations from run-to-run if
the simulation is scheduled on a cluster where paths may change).

Also, this changeset allows circumventing host pseudofiles which
have information specific to the host processor (such as cache
hierarchy or processor information). Bypassing host pseudofiles
can be useful when executing runtimes in the absence of an
operating system kernel since runtimes may try to query standard
files (i.e. /proc or /sys) which are not relevant to an
application executing in syscall emulation mode.

Change-Id: I90821b3b403168b904a662fa98b85def1628621c
---
A configs/common/FileSystemConfig.py
M configs/common/Options.py
M configs/example/se.py
A src/doc/se-files.txt
M src/kern/linux/linux.cc
M src/sim/Process.py
A src/sim/RedirectPath.py
M src/sim/SConscript
M src/sim/System.py
M src/sim/process.cc
M src/sim/process.hh
A src/sim/redirect_path.cc
A src/sim/redirect_path.hh
M src/sim/syscall_emul.cc
M src/sim/syscall_emul.hh
M src/sim/system.cc
M src/sim/system.hh
17 files changed, 755 insertions(+), 94 deletions(-)


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12119
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: I90821b3b403168b904a662fa98b85def1628621c
Gerrit-Change-Number: 12119
Gerrit-PatchSet: 17
Gerrit-Owner: Brandon Potter 
Gerrit-Reviewer: Anthony Gutierrez 
Gerrit-Reviewer: Brandon Potter 
Gerrit-Reviewer: Ciro Santilli 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-CC: Andreas Sandberg 
Gerrit-CC: Giacomo Travaglini 
Gerrit-MessageType: newpatchset
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in gem5/gem5[master]: sim-se: add a faux-filesystem

2019-03-22 Thread Brandon Potter (Gerrit)

Hello Anthony Gutierrez, Jason Lowe-Power, Ciro Santilli,

I'd like you to reexamine a change. Please visit

https://gem5-review.googlesource.com/c/public/gem5/+/12119

to look at the new patch set (#16).

Change subject: sim-se: add a faux-filesystem
..

sim-se: add a faux-filesystem

This change introduces the concept of a faux-filesystem.
The faux-filesystem creates a directory structure in m5out
(or whatever output dir the user specifies) where system calls
may be redirected.

This is useful to avoid non-determinism when reading files
with varying path names (e.g., variations from run-to-run if
the simulation is scheduled on a cluster where paths may change).

Also, this changeset allows circumventing host pseudofiles which
have information specific to the host processor (such as cache
hierarchy or processor information). Bypassing host pseudofiles
can be useful when executing runtimes in the absence of an
operating system kernel since runtimes may try to query standard
files (i.e. /proc or /sys) which are not relevant to an
application executing in syscall emulation mode.

Change-Id: I90821b3b403168b904a662fa98b85def1628621c
---
A configs/common/FileSystemConfig.py
M configs/common/Options.py
M configs/example/se.py
M src/kern/linux/linux.cc
M src/sim/Process.py
A src/sim/RedirectPath.py
M src/sim/SConscript
M src/sim/System.py
M src/sim/process.cc
M src/sim/process.hh
A src/sim/redirect_path.cc
A src/sim/redirect_path.hh
M src/sim/syscall_emul.cc
M src/sim/syscall_emul.hh
M src/sim/system.cc
M src/sim/system.hh
16 files changed, 602 insertions(+), 94 deletions(-)


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12119
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: I90821b3b403168b904a662fa98b85def1628621c
Gerrit-Change-Number: 12119
Gerrit-PatchSet: 16
Gerrit-Owner: Brandon Potter 
Gerrit-Reviewer: Anthony Gutierrez 
Gerrit-Reviewer: Brandon Potter 
Gerrit-Reviewer: Ciro Santilli 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-CC: Andreas Sandberg 
Gerrit-CC: Giacomo Travaglini 
Gerrit-MessageType: newpatchset
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in gem5/gem5[master]: sim-se: add a faux-filesystem

2019-03-14 Thread Brandon Potter (Gerrit)

Hello Anthony Gutierrez, Jason Lowe-Power, Ciro Santilli,

I'd like you to reexamine a change. Please visit

https://gem5-review.googlesource.com/c/public/gem5/+/12119

to look at the new patch set (#15).

Change subject: sim-se: add a faux-filesystem
..

sim-se: add a faux-filesystem

This change introduces the concept of a faux-filesystem.
The faux-filesystem creates a directory structure in m5out
(or whatever output dir the user specifies) where system calls
may be redirected.

This is useful to avoid non-determinism when reading files
with varying path names (e.g., variations from run-to-run if
the simulation is scheduled on a cluster where paths may change).

Also, this changeset allows circumventing host pseudofiles which
have information specific to the host processor (such as cache
hierarchy or processor information). Bypassing host pseudofiles
can be useful when executing runtimes in the absence of an
operating system kernel since runtimes may try to query standard
files (i.e. /proc or /sys) which are not relevant to an
application executing in syscall emulation mode.

Change-Id: I90821b3b403168b904a662fa98b85def1628621c
---
A configs/common/FileSystemConfig.py
M configs/common/Options.py
M configs/example/se.py
M src/kern/linux/linux.cc
M src/sim/Process.py
A src/sim/RedirectPath.py
M src/sim/SConscript
M src/sim/System.py
M src/sim/process.cc
M src/sim/process.hh
A src/sim/redirect_path.cc
A src/sim/redirect_path.hh
M src/sim/syscall_emul.cc
M src/sim/syscall_emul.hh
M src/sim/system.cc
M src/sim/system.hh
16 files changed, 585 insertions(+), 87 deletions(-)


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12119
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: I90821b3b403168b904a662fa98b85def1628621c
Gerrit-Change-Number: 12119
Gerrit-PatchSet: 15
Gerrit-Owner: Brandon Potter 
Gerrit-Reviewer: Anthony Gutierrez 
Gerrit-Reviewer: Brandon Potter 
Gerrit-Reviewer: Ciro Santilli 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-CC: Andreas Sandberg 
Gerrit-CC: Giacomo Travaglini 
Gerrit-MessageType: newpatchset
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in gem5/gem5[master]: sim-se: add a faux-filesystem

2019-03-13 Thread Brandon Potter (Gerrit)

Hello Anthony Gutierrez, Jason Lowe-Power,

I'd like you to reexamine a change. Please visit

https://gem5-review.googlesource.com/c/public/gem5/+/12119

to look at the new patch set (#14).

Change subject: sim-se: add a faux-filesystem
..

sim-se: add a faux-filesystem

This change introduces the concept of a faux-filesystem.
The faux-filesystem creates a directory structure in m5out
(or whatever output dir the user specifies) where system calls
may be redirected.

This is useful to avoid non-determinism when reading files
with varying path names (e.g., variations from run-to-run if
the simulation is scheduled on a cluster where paths may change).

Also, this changeset allows circumventing host pseudofiles which
have information specific to the host processor (such as cache
hierarchy or processor information). Bypassing host pseudofiles
can be useful when executing runtimes in the absence of an
operating system kernel since runtimes may try to query standard
files (i.e. /proc or /sys) which are not relevant to an
application executing in syscall emulation mode.

Change-Id: I90821b3b403168b904a662fa98b85def1628621c
---
A configs/common/FileSystemConfig.py
M configs/common/Options.py
M configs/example/se.py
M src/kern/linux/linux.cc
M src/sim/Process.py
A src/sim/RedirectPath.py
M src/sim/SConscript
M src/sim/System.py
M src/sim/process.cc
M src/sim/process.hh
A src/sim/redirect_path.cc
A src/sim/redirect_path.hh
M src/sim/syscall_emul.cc
M src/sim/syscall_emul.hh
M src/sim/system.cc
M src/sim/system.hh
16 files changed, 597 insertions(+), 99 deletions(-)


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12119
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: I90821b3b403168b904a662fa98b85def1628621c
Gerrit-Change-Number: 12119
Gerrit-PatchSet: 14
Gerrit-Owner: Brandon Potter 
Gerrit-Reviewer: Anthony Gutierrez 
Gerrit-Reviewer: Brandon Potter 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-CC: Andreas Sandberg 
Gerrit-CC: Giacomo Travaglini 
Gerrit-MessageType: newpatchset
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in gem5/gem5[master]: sim-se: add a faux-filesystem

2019-03-11 Thread Brandon Potter (Gerrit)
Brandon Potter has uploaded a new patch set (#12). (  
https://gem5-review.googlesource.com/c/public/gem5/+/12119 )


Change subject: sim-se: add a faux-filesystem
..

sim-se: add a faux-filesystem

This change introduces the concept of a faux-filesystem.
The faux-filesystem creates a directory structure in m5out
(or whatever output dir the user specifies) where system calls
may be redirected.

This is useful to avoid non-determinism when reading files
with varying path names (e.g., variations from run-to-run if
the simulation is scheduled on a cluster where paths may change).

Also, this changeset allows circumventing host pseudofiles which
have information specific to the host processor (such as cache
hierarchy or processor information). Bypassing host pseudofiles
can be useful when executing runtimes in the absence of an
operating system kernel since runtimes may try to query standard
files (i.e. /proc or /sys) which are not relevant to an
application executing in syscall emulation mode.

Change-Id: I90821b3b403168b904a662fa98b85def1628621c
---
A configs/common/FileSystemConfig.py
M configs/common/Options.py
M configs/example/se.py
M src/kern/linux/linux.cc
M src/sim/Process.py
A src/sim/RedirectPath.py
M src/sim/SConscript
M src/sim/System.py
M src/sim/process.cc
M src/sim/process.hh
A src/sim/redirect_path.cc
A src/sim/redirect_path.hh
M src/sim/syscall_emul.cc
M src/sim/syscall_emul.hh
M src/sim/system.cc
M src/sim/system.hh
16 files changed, 619 insertions(+), 99 deletions(-)


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12119
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: I90821b3b403168b904a662fa98b85def1628621c
Gerrit-Change-Number: 12119
Gerrit-PatchSet: 12
Gerrit-Owner: Brandon Potter 
Gerrit-Reviewer: Brandon Potter 
Gerrit-CC: Andreas Sandberg 
Gerrit-CC: Giacomo Travaglini 
Gerrit-CC: Jason Lowe-Power 
Gerrit-MessageType: newpatchset
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev