[gem5-dev] Change in gem5/gem5[master]: sim-se: add a release parameter to Process.py

2019-05-29 Thread Ciro Santilli (Gerrit)
Ciro Santilli has submitted this change and it was merged. (  
https://gem5-review.googlesource.com/c/public/gem5/+/17849 )


Change subject: sim-se: add a release parameter to Process.py
..

sim-se: add a release parameter to Process.py

Set the default release to that single value for all ISAs.

glibc has checks for the kernel version based on uname, and refuses
to start any syscall emulation programs if those checks don't pass with
error:

FATAL: kernel too old

The ideal solution to this problem is to actually implement all missing
system calls for the required kernel version and bumping the release
accordingly.

However, it is very hard to implement all missing syscalls and verify
compliance.

Previously, we have simply bumped the version manually from time to
time when major glibc versions started breaking.

This commit alleviates the problem in two ways.

Firstly, having a single kernel version for all versions means that it is
easier to bump all versions at once.

Secondly, it makes it is possible to set the release with a parameter,
which in turn can be set from the command line with:

se.py --param 'system.cpu[:].workload[:].release = "4.18.0"'

Change-Id: I9e3c31073bfe68735f7b0775c8e299aa62b98222
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17849
Maintainer: Brandon Potter 
Reviewed-by: Jason Lowe-Power 
Tested-by: kokoro 
---
M src/arch/alpha/linux/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/solaris/process.cc
M src/arch/x86/linux/process.cc
M src/sim/Process.py
M src/sim/process.cc
M src/sim/process.hh
11 files changed, 15 insertions(+), 10 deletions(-)

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



diff --git a/src/arch/alpha/linux/process.cc  
b/src/arch/alpha/linux/process.cc

index de89410..d342c5d 100644
--- a/src/arch/alpha/linux/process.cc
+++ b/src/arch/alpha/linux/process.cc
@@ -85,7 +85,7 @@

 strcpy(name->sysname, "Linux");
 strcpy(name->nodename, "sim.gem5.org");
-strcpy(name->release, "3.0.0");
+strcpy(name->release, process->release.c_str());
 strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003");
 strcpy(name->machine, "alpha");

diff --git a/src/arch/arm/linux/process.cc b/src/arch/arm/linux/process.cc
index 25bccb6..3fcb01f 100644
--- a/src/arch/arm/linux/process.cc
+++ b/src/arch/arm/linux/process.cc
@@ -113,7 +113,7 @@

 strcpy(name->sysname, "Linux");
 strcpy(name->nodename, "m5.eecs.umich.edu");
-strcpy(name->release, "3.7.0+");
+strcpy(name->release, process->release.c_str());
 strcpy(name->version, "#1 SMP Sat Dec  1 00:00:00 GMT 2012");
 strcpy(name->machine, "armv7l");

@@ -131,7 +131,7 @@

 strcpy(name->sysname, "Linux");
 strcpy(name->nodename, "gem5");
-strcpy(name->release, "4.10.8+");
+strcpy(name->release, process->release.c_str());
 strcpy(name->version, "#1 SMP Sat Dec  1 00:00:00 GMT 2012");
 strcpy(name->machine, "armv8l");

diff --git a/src/arch/mips/linux/process.cc b/src/arch/mips/linux/process.cc
index 8a4811a..9efaf26 100644
--- a/src/arch/mips/linux/process.cc
+++ b/src/arch/mips/linux/process.cc
@@ -88,7 +88,7 @@

 strcpy(name->sysname, "Linux");
 strcpy(name->nodename,"sim.gem5.org");
-strcpy(name->release, "3.0.0");
+strcpy(name->release, process->release.c_str());
 strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003");
 strcpy(name->machine, "mips");

diff --git a/src/arch/power/linux/process.cc  
b/src/arch/power/linux/process.cc

index 58e7eb5..8a5cd13 100644
--- a/src/arch/power/linux/process.cc
+++ b/src/arch/power/linux/process.cc
@@ -88,7 +88,7 @@

 strcpy(name->sysname, "Linux");
 strcpy(name->nodename, "sim.gem5.org");
-strcpy(name->release, "3.0.0");
+strcpy(name->release, process->release.c_str());
 strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003");
 strcpy(name->machine, "power");

diff --git a/src/arch/riscv/linux/process.cc  
b/src/arch/riscv/linux/process.cc

index f3f328e..8aebd55 100644
--- a/src/arch/riscv/linux/process.cc
+++ b/src/arch/riscv/linux/process.cc
@@ -96,7 +96,7 @@

 strcpy(name->sysname, "Linux");
 strcpy(name->nodename,"sim.gem5.org");
-strcpy(name->release, "3.0.0");
+strcpy(name->release, process->release.c_str());
 strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003");
 strcpy(name->machine, "riscv64");

@@ -114,7 +114,7 @@

 strcpy(name->sysname, "Linux");
 strcpy(name->nodename,"sim.gem5.org");
-strcpy(name->release, "3.0.0");
+strcpy(name->release, process->release.c_str());
 strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003");
 strcpy(name->machine, "riscv32");

diff --git 

[gem5-dev] Change in gem5/gem5[master]: sim-se: add a release parameter to Process.py

2019-05-21 Thread Ciro Santilli (Gerrit)
Hello Andreas Sandberg, Brandon Potter, Giacomo Travaglini, Gabe Black,  
Anthony Gutierrez, Jason Lowe-Power,


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

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

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

Change subject: sim-se: add a release parameter to Process.py
..

sim-se: add a release parameter to Process.py

Set the default release to that single value for all ISAs.

glibc has checks for the kernel version based on uname, and refuses
to start any syscall emulation programs if those checks don't pass with
error:

FATAL: kernel too old

The ideal solution to this problem is to actually implement all missing
system calls for the required kernel version and bumping the release
accordingly.

However, it is very hard to implement all missing syscalls and verify
compliance.

Previously, we have simply bumped the version manually from time to
time when major glibc versions started breaking.

This commit alleviates the problem in two ways.

Firstly, having a single kernel version for all versions means that it is
easier to bump all versions at once.

Secondly, it makes it is possible to set the release with a parameter,
which in turn can be set from the command line with:

se.py --param 'system.cpu[:].workload[:].release = "4.18.0"'

Change-Id: I9e3c31073bfe68735f7b0775c8e299aa62b98222
---
M src/arch/alpha/linux/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/solaris/process.cc
M src/arch/x86/linux/process.cc
M src/sim/Process.py
M src/sim/process.cc
M src/sim/process.hh
11 files changed, 15 insertions(+), 10 deletions(-)


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