[gem5-dev] Change in gem5/gem5[develop]: tests: Update nightly.sh to separate compile and run threads

2021-12-02 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/53483 )


Change subject: tests: Update nightly.sh to separate compile and run threads
..

tests: Update nightly.sh to separate compile and run threads

This allows us to set a high number of threads for gem5 compilation
tasks, and a lower number of threads for running gem5. The latter is
more memory intensive and, therefore, we cannot always use the maximum
number of threads in a system.

Change-Id: I699d9f74b21d31841bf31e3589d323b007cb4601
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53483
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M tests/nightly.sh
1 file changed, 35 insertions(+), 10 deletions(-)

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




diff --git a/tests/nightly.sh b/tests/nightly.sh
index b785d55..26f8cfe 100755
--- a/tests/nightly.sh
+++ b/tests/nightly.sh
@@ -32,11 +32,18 @@
 dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
 gem5_root="${dir}/.."

-# We assume the lone argument is the number of threads. If no argument is
-# given we default to one.
-threads=1
+# The first argument is the number of threads to be used for compilation.  
If no

+# argument is given we default to one.
+compile_threads=1
 if [[ $# -gt 0 ]]; then
-threads=$1
+compile_threads=$1
+fi
+
+# The second argument is the number of threads used to run gem5 (one gem5
+# instance per thread). If no argument is given we default to one.
+run_threads=1
+if [[ $# -gt 1 ]]; then
+run_threads=$2
 fi

 build_target () {
@@ -47,8 +54,8 @@
 # compilation: https://gem5.atlassian.net/browse/GEM5-753
 docker run -u $UID:$GID --volume "${gem5_root}":"${gem5_root}" -w \
 "${gem5_root}" --rm gcr.io/gem5-test/ubuntu-20.04_all-dependencies  
\

-bash -c "scons build/${isa}/gem5.opt -j${threads} \
-|| (rm -rf build && scons build/${isa}/gem5.opt  
-j${threads})"

+bash -c "scons build/${isa}/gem5.opt -j${compile_threads} \
+|| (rm -rf build && scons build/${isa}/gem5.opt  
-j${compile_threads})"

 }

 unit_test () {
@@ -56,7 +63,7 @@

 docker run -u $UID:$GID --volume "${gem5_root}":"${gem5_root}" -w \
 "${gem5_root}" --rm gcr.io/gem5-test/ubuntu-20.04_all-dependencies  
\

-scons build/NULL/unittests.${build} -j${threads}
+scons build/NULL/unittests.${build} -j${compile_threads}
 }

 # Ensure we have the latest docker images.
@@ -78,15 +85,15 @@
 # Run the gem5 long tests.
 docker run -u $UID:$GID --volume "${gem5_root}":"${gem5_root}" -w \
 "${gem5_root}"/tests --rm  
gcr.io/gem5-test/ubuntu-20.04_all-dependencies \

-./main.py run --length long -j${threads} -t${threads} -vv
+./main.py run --length long -j${compile_threads} -t${run_threads}  
-vv


 # Run the GPU tests.
 # For the GPU tests we compile and run GCN3_X86 inside a gcn-gpu container.
 docker pull gcr.io/gem5-test/gcn-gpu:latest
 docker run --rm -u $UID:$GID --volume "${gem5_root}":"${gem5_root}" -w \
 "${gem5_root}" gcr.io/gem5-test/gcn-gpu:latest bash -c \
-"scons build/GCN3_X86/gem5.opt -j${threads} \
-|| (rm -rf build && scons build/GCN3_X86/gem5.opt -j${threads})"
+"scons build/GCN3_X86/gem5.opt -j${compile_threads} \
+|| (rm -rf build && scons build/GCN3_X86/gem5.opt  
-j${compile_threads})"


 # get square
 wget -qN http://dist.gem5.org/dist/develop/test-progs/square/square

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/53483
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: I699d9f74b21d31841bf31e3589d323b007cb4601
Gerrit-Change-Number: 53483
Gerrit-PatchSet: 2
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: tests: Disable failing tests until root cause determined

2021-12-02 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/53504 )


Change subject: tests: Disable failing tests until root cause determined
..

tests: Disable failing tests until root cause determined

This should be a temporary change. Due to an issue, outlined here:
https://gem5.atlassian.net/browse/GEM5-1120, these tests have been
disabled. One of these tests, if not a combination of them, is causing a
timeout event to occur in the Nightly tests. They have therefore been
disabled until the exact cause of failure is established.

Change-Id: I4303e7b157dcf32a7879b014a9f5a88efa62b756
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53504
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M tests/gem5/x86-boot-tests/test_linux_boot.py
M tests/gem5/riscv-boot-tests/test_linux_boot.py
2 files changed, 65 insertions(+), 37 deletions(-)

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




diff --git a/tests/gem5/riscv-boot-tests/test_linux_boot.py  
b/tests/gem5/riscv-boot-tests/test_linux_boot.py

index 7c70d1d..9eb9ae3 100644
--- a/tests/gem5/riscv-boot-tests/test_linux_boot.py
+++ b/tests/gem5/riscv-boot-tests/test_linux_boot.py
@@ -140,37 +140,41 @@

  The long (Nightly) tests 

-test_boot(
-cpu="atomic",
-num_cpus=1,
-cache_type="classic",
-length=constants.long_tag,
-)
+# Due to Nightly test timeout issues, outlined here:
+# https://gem5.atlassian.net/browse/GEM5-1120, these tests have been  
disabled
+# until the exact error causing the Nightly tests to timeout is  
established.


-test_boot(
-cpu="timing",
-num_cpus=1,
-cache_type="mi_example",
-length=constants.long_tag,
-)
+#test_boot(
+#cpu="atomic",
+#num_cpus=1,
+#cache_type="classic",
+#length=constants.long_tag,
+#)

-test_boot(
-cpu="timing",
-num_cpus=4,
-cache_type="mi_example",
-length=constants.long_tag,
-)
+#test_boot(
+#cpu="timing",
+#num_cpus=1,
+#cache_type="mi_example",
+#length=constants.long_tag,
+#)

-test_boot(
-cpu="atomic",
-num_cpus=4,
-cache_type="classic",
-length=constants.long_tag,
-)
+#test_boot(
+#cpu="timing",
+#num_cpus=4,
+#cache_type="mi_example",
+#length=constants.long_tag,
+#)

-test_boot(
-cpu="o3",
-num_cpus=8,
-cache_type="mi_example",
-length=constants.long_tag,
-)
+#test_boot(
+#cpu="atomic",
+#num_cpus=4,
+#cache_type="classic",
+#length=constants.long_tag,
+#)
+
+#test_boot(
+#cpu="o3",
+#num_cpus=8,
+#cache_type="mi_example",
+#length=constants.long_tag,
+#)
diff --git a/tests/gem5/x86-boot-tests/test_linux_boot.py  
b/tests/gem5/x86-boot-tests/test_linux_boot.py

index 600d04b..ebf520e 100644
--- a/tests/gem5/x86-boot-tests/test_linux_boot.py
+++ b/tests/gem5/x86-boot-tests/test_linux_boot.py
@@ -170,13 +170,18 @@
 length=constants.long_tag,
 )

-test_boot(
-cpu="o3",
-num_cpus=2,
-mem_system="mesi_two_level",
-boot_type="init",
-length=constants.long_tag,
-)
+
+# Due to Nightly test timeout issues, outlined here:
+# https://gem5.atlassian.net/browse/GEM5-1120, this test has been disabled
+# until the exact error causing the Nightly tests to timeout is  
established.

+
+#test_boot(
+#cpu="o3",
+#num_cpus=2,
+#mem_system="mesi_two_level",
+#boot_type="init",
+#length=constants.long_tag,
+#)

  The very-long (Weekly) tests 


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/53504
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: I4303e7b157dcf32a7879b014a9f5a88efa62b756
Gerrit-Change-Number: 53504
Gerrit-PatchSet: 2
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: tests: Disable failing tests until root cause determined

2021-12-01 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/53504 )



Change subject: tests: Disable failing tests until root cause determined
..

tests: Disable failing tests until root cause determined

This should be a temporary change. Due to an issue, outlined here:
https://gem5.atlassian.net/browse/GEM5-1120, these tests have been
disabled. One of these tests, if not a combination of them, is causing a
timeout event to occur in the Nightly tests. They have therefore been
disabled until the exact cause of failure is established.

Change-Id: I4303e7b157dcf32a7879b014a9f5a88efa62b756
---
M tests/gem5/x86-boot-tests/test_linux_boot.py
M tests/gem5/riscv-boot-tests/test_linux_boot.py
2 files changed, 61 insertions(+), 37 deletions(-)



diff --git a/tests/gem5/riscv-boot-tests/test_linux_boot.py  
b/tests/gem5/riscv-boot-tests/test_linux_boot.py

index 7c70d1d..9eb9ae3 100644
--- a/tests/gem5/riscv-boot-tests/test_linux_boot.py
+++ b/tests/gem5/riscv-boot-tests/test_linux_boot.py
@@ -140,37 +140,41 @@

  The long (Nightly) tests 

-test_boot(
-cpu="atomic",
-num_cpus=1,
-cache_type="classic",
-length=constants.long_tag,
-)
+# Due to Nightly test timeout issues, outlined here:
+# https://gem5.atlassian.net/browse/GEM5-1120, these tests have been  
disabled
+# until the exact error causing the Nightly tests to timeout is  
established.


-test_boot(
-cpu="timing",
-num_cpus=1,
-cache_type="mi_example",
-length=constants.long_tag,
-)
+#test_boot(
+#cpu="atomic",
+#num_cpus=1,
+#cache_type="classic",
+#length=constants.long_tag,
+#)

-test_boot(
-cpu="timing",
-num_cpus=4,
-cache_type="mi_example",
-length=constants.long_tag,
-)
+#test_boot(
+#cpu="timing",
+#num_cpus=1,
+#cache_type="mi_example",
+#length=constants.long_tag,
+#)

-test_boot(
-cpu="atomic",
-num_cpus=4,
-cache_type="classic",
-length=constants.long_tag,
-)
+#test_boot(
+#cpu="timing",
+#num_cpus=4,
+#cache_type="mi_example",
+#length=constants.long_tag,
+#)

-test_boot(
-cpu="o3",
-num_cpus=8,
-cache_type="mi_example",
-length=constants.long_tag,
-)
+#test_boot(
+#cpu="atomic",
+#num_cpus=4,
+#cache_type="classic",
+#length=constants.long_tag,
+#)
+
+#test_boot(
+#cpu="o3",
+#num_cpus=8,
+#cache_type="mi_example",
+#length=constants.long_tag,
+#)
diff --git a/tests/gem5/x86-boot-tests/test_linux_boot.py  
b/tests/gem5/x86-boot-tests/test_linux_boot.py

index 600d04b..ebf520e 100644
--- a/tests/gem5/x86-boot-tests/test_linux_boot.py
+++ b/tests/gem5/x86-boot-tests/test_linux_boot.py
@@ -170,13 +170,18 @@
 length=constants.long_tag,
 )

-test_boot(
-cpu="o3",
-num_cpus=2,
-mem_system="mesi_two_level",
-boot_type="init",
-length=constants.long_tag,
-)
+
+# Due to Nightly test timeout issues, outlined here:
+# https://gem5.atlassian.net/browse/GEM5-1120, this test has been disabled
+# until the exact error causing the Nightly tests to timeout is  
established.

+
+#test_boot(
+#cpu="o3",
+#num_cpus=2,
+#mem_system="mesi_two_level",
+#boot_type="init",
+#length=constants.long_tag,
+#)

  The very-long (Weekly) tests 


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/53504
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: I4303e7b157dcf32a7879b014a9f5a88efa62b756
Gerrit-Change-Number: 53504
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: tests: Update nightly.sh to separate compile and run threads

2021-12-01 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/53483 )



Change subject: tests: Update nightly.sh to separate compile and run threads
..

tests: Update nightly.sh to separate compile and run threads

This allows us to set a high number of threads for gem5 compilation
tasks, and a lower number of threads for running gem5. The latter is
more memory intensive and, therefore, we cannot always use the maximum
number of threads in a system.

Change-Id: I699d9f74b21d31841bf31e3589d323b007cb4601
---
M tests/nightly.sh
1 file changed, 31 insertions(+), 10 deletions(-)



diff --git a/tests/nightly.sh b/tests/nightly.sh
index b785d55..26f8cfe 100755
--- a/tests/nightly.sh
+++ b/tests/nightly.sh
@@ -32,11 +32,18 @@
 dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
 gem5_root="${dir}/.."

-# We assume the lone argument is the number of threads. If no argument is
-# given we default to one.
-threads=1
+# The first argument is the number of threads to be used for compilation.  
If no

+# argument is given we default to one.
+compile_threads=1
 if [[ $# -gt 0 ]]; then
-threads=$1
+compile_threads=$1
+fi
+
+# The second argument is the number of threads used to run gem5 (one gem5
+# instance per thread). If no argument is given we default to one.
+run_threads=1
+if [[ $# -gt 1 ]]; then
+run_threads=$2
 fi

 build_target () {
@@ -47,8 +54,8 @@
 # compilation: https://gem5.atlassian.net/browse/GEM5-753
 docker run -u $UID:$GID --volume "${gem5_root}":"${gem5_root}" -w \
 "${gem5_root}" --rm gcr.io/gem5-test/ubuntu-20.04_all-dependencies  
\

-bash -c "scons build/${isa}/gem5.opt -j${threads} \
-|| (rm -rf build && scons build/${isa}/gem5.opt  
-j${threads})"

+bash -c "scons build/${isa}/gem5.opt -j${compile_threads} \
+|| (rm -rf build && scons build/${isa}/gem5.opt  
-j${compile_threads})"

 }

 unit_test () {
@@ -56,7 +63,7 @@

 docker run -u $UID:$GID --volume "${gem5_root}":"${gem5_root}" -w \
 "${gem5_root}" --rm gcr.io/gem5-test/ubuntu-20.04_all-dependencies  
\

-scons build/NULL/unittests.${build} -j${threads}
+scons build/NULL/unittests.${build} -j${compile_threads}
 }

 # Ensure we have the latest docker images.
@@ -78,15 +85,15 @@
 # Run the gem5 long tests.
 docker run -u $UID:$GID --volume "${gem5_root}":"${gem5_root}" -w \
 "${gem5_root}"/tests --rm  
gcr.io/gem5-test/ubuntu-20.04_all-dependencies \

-./main.py run --length long -j${threads} -t${threads} -vv
+./main.py run --length long -j${compile_threads} -t${run_threads}  
-vv


 # Run the GPU tests.
 # For the GPU tests we compile and run GCN3_X86 inside a gcn-gpu container.
 docker pull gcr.io/gem5-test/gcn-gpu:latest
 docker run --rm -u $UID:$GID --volume "${gem5_root}":"${gem5_root}" -w \
 "${gem5_root}" gcr.io/gem5-test/gcn-gpu:latest bash -c \
-"scons build/GCN3_X86/gem5.opt -j${threads} \
-|| (rm -rf build && scons build/GCN3_X86/gem5.opt -j${threads})"
+"scons build/GCN3_X86/gem5.opt -j${compile_threads} \
+|| (rm -rf build && scons build/GCN3_X86/gem5.opt  
-j${compile_threads})"


 # get square
 wget -qN http://dist.gem5.org/dist/develop/test-progs/square/square

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/53483
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: I699d9f74b21d31841bf31e3589d323b007cb4601
Gerrit-Change-Number: 53483
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: scons: CheckLinkFlag() only adds to flags if test succeeds

2021-12-01 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/53025 )


Change subject: scons: CheckLinkFlag() only adds to flags if test succeeds
..

scons: CheckLinkFlag() only adds to flags if test succeeds

Previously, did not check the return of TryLink() before appending, so
unsupported flags can be used when building shared libraries. This
patch adds checking.

Jira Issue: https://gem5.atlassian.net/browse/GEM5-1115

Change-Id: Ief62be15009cae9e0281b4d9c2d7b26e0223
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53025
Reviewed-by: Jason Lowe-Power 
Reviewed-by: Gabe Black 
Maintainer: Jason Lowe-Power 
Maintainer: Gabe Black 
Tested-by: kokoro 
---
M site_scons/gem5_scons/configure.py
1 file changed, 22 insertions(+), 1 deletion(-)

Approvals:
  Jason Lowe-Power: Looks good to me, but someone else must approve; Looks  
good to me, approved

  Gabe Black: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/site_scons/gem5_scons/configure.py  
b/site_scons/gem5_scons/configure.py

index 3993686..b335673 100644
--- a/site_scons/gem5_scons/configure.py
+++ b/site_scons/gem5_scons/configure.py
@@ -61,7 +61,7 @@
 ret = context.TryLink('int main(int, char *[]) { return 0; }', '.cc')
 if not (ret and autoadd):
 context.env['LINKFLAGS'] = last_linkflags
-if set_for_shared:
+if (ret and set_for_shared):
 assert(autoadd)
 context.env.Append(SHLINKFLAGS=[flag])
 context.Result(ret)

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/53025
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: Ief62be15009cae9e0281b4d9c2d7b26e0223
Gerrit-Change-Number: 53025
Gerrit-PatchSet: 2
Gerrit-Owner: Arun Rodrigues 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: tests: Add '-vv' verbose flags to Kokoro/Nightly/Weekly tests

2021-11-29 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/53305 )


Change subject: tests: Add '-vv' verbose flags to Kokoro/Nightly/Weekly  
tests

..

tests: Add '-vv' verbose flags to Kokoro/Nightly/Weekly tests

Without this verbose flag, there is no information output on the tests
currently running. Output is only given on the pass/fail status of a
test after completion. This is unhelpful if the tests fail due to a
timeout (e.g., a test has stalled).

The '-vv' verbose flags sets up the TestLib package to output when a
test has started execution. This information can help in figuring out
which test caused a timeout event to occur.

Change-Id: I14e6752d40a7c8d7189211584073ba79c88ed7d5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53305
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
Reviewed-by: Jason Lowe-Power 
---
M tests/weekly.sh
M tests/jenkins/presubmit-stage2.sh
M tests/nightly.sh
3 files changed, 25 insertions(+), 3 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved
  Bobby R. Bruce: Looks good to me, approved
  kokoro: Regressions pass




diff --git a/tests/jenkins/presubmit-stage2.sh  
b/tests/jenkins/presubmit-stage2.sh

index d4d5841..6e73394 100755
--- a/tests/jenkins/presubmit-stage2.sh
+++ b/tests/jenkins/presubmit-stage2.sh
@@ -46,5 +46,5 @@
 # Look for tests in the gem5 subdirectory
 # Once complete, run the Google Tests
 cd tests
-./main.py run -j4 -t4 gem5 && scons -C .. --no-compress-debug \
+./main.py run -j4 -t4 gem5 -vv && scons -C .. --no-compress-debug \
 build/ARM/unittests.opt
diff --git a/tests/nightly.sh b/tests/nightly.sh
index 9f69eb1..b785d55 100755
--- a/tests/nightly.sh
+++ b/tests/nightly.sh
@@ -78,7 +78,7 @@
 # Run the gem5 long tests.
 docker run -u $UID:$GID --volume "${gem5_root}":"${gem5_root}" -w \
 "${gem5_root}"/tests --rm  
gcr.io/gem5-test/ubuntu-20.04_all-dependencies \

-./main.py run --length long -j${threads} -t${threads}
+./main.py run --length long -j${threads} -t${threads} -vv

 # Run the GPU tests.
 # For the GPU tests we compile and run GCN3_X86 inside a gcn-gpu container.
diff --git a/tests/weekly.sh b/tests/weekly.sh
index 172d955..d65ee40 100755
--- a/tests/weekly.sh
+++ b/tests/weekly.sh
@@ -42,7 +42,7 @@
 # Run the gem5 very-long tests.
 docker run -u $UID:$GID --volume "${gem5_root}":"${gem5_root}" -w \
 "${gem5_root}"/tests --rm  
gcr.io/gem5-test/ubuntu-20.04_all-dependencies \

-./main.py run --length very-long -j${threads} -t${threads}
+./main.py run --length very-long -j${threads} -t${threads} -vv

 mkdir -p tests/testing-results


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/53305
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: I14e6752d40a7c8d7189211584073ba79c88ed7d5
Gerrit-Change-Number: 53305
Gerrit-PatchSet: 2
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
Gerrit-CC: Gabe Black 
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

[gem5-dev] Change in gem5/gem5[develop]: tests,ext: Log test time taken in TestLib verbose output

2021-11-29 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/53343 )



Change subject: tests,ext: Log test time taken in TestLib verbose output
..

tests,ext: Log test time taken in TestLib verbose output

With this patch the user can obtain the time taken, in seconds, when
using the `-vv` flag.

Note: These are not _exact_ time measurements as they are taken through
the message handler (not directly when tests are stopped and started),
but they should be accurate enough for most purposes.

Change-Id: I57b92d6be1159f126182e12871ce2b700705617a
---
M ext/testlib/handlers.py
1 file changed, 31 insertions(+), 3 deletions(-)



diff --git a/ext/testlib/handlers.py b/ext/testlib/handlers.py
index fa7aea9..95ac32d 100644
--- a/ext/testlib/handlers.py
+++ b/ext/testlib/handlers.py
@@ -267,6 +267,10 @@
 log.LibraryMessage.type_id: self.handle_librarymessage,
 }

+# A Dictionary for storing test start times, used to calculate the
+# total execution time of a test. Key = test name; value = start  
time.

+self._start_time_dict = {}
+
 def _display_outcome(self, name, outcome, reason=None):
 print(self.color.Bold
  + SummaryHandler.colormap[outcome]
@@ -283,13 +287,21 @@

 def handle_teststatus(self, record):
 if record['status'] == state.Status.Running:
+self._start_time_dict[record['metadata'].name] = time.time()
 log.test_log.debug('Starting Test Case: %s' %\
 record['metadata'].name)

 def handle_testresult(self, record):
-self._display_outcome(
-'Test: %s'  % record['metadata'].name,
-record['result'].value)
+name = record['metadata'].name
+self._display_outcome('Test: %s'  % name,record['result'].value)
+
+if name in self._start_time_dict.keys():
+time_taken = (
+time.time() -  
self._start_time_dict[record['metadata'].name]

+)
+log.test_log.debug(
+f"Test {name} completed in {time_taken:.2f} seconds"
+)

 def handle_suitestatus(self, record):
 if record['status'] == state.Status.Running:

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/53343
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: I57b92d6be1159f126182e12871ce2b700705617a
Gerrit-Change-Number: 53343
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: tests: Add '-vv' verbose flags to Kokoro/Nightly/Weekly tests

2021-11-28 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/53305 )



Change subject: tests: Add '-vv' verbose flags to Kokoro/Nightly/Weekly  
tests

..

tests: Add '-vv' verbose flags to Kokoro/Nightly/Weekly tests

Without this verbose flag, there is no information output on the tests
currently running. Output is only given on the pass/fail status of a
test after completion. This is unhelpful if the tests fail due to a
timeout (e.g., a test has stalled).

The '-vv' verbose flags sets up the TestLib package to output when a
test has started execution. This information can help in figuring out
which test caused a timeout event to occur.

Change-Id: I14e6752d40a7c8d7189211584073ba79c88ed7d5
---
M tests/weekly.sh
M tests/jenkins/presubmit-stage2.sh
M tests/nightly.sh
3 files changed, 21 insertions(+), 3 deletions(-)



diff --git a/tests/jenkins/presubmit-stage2.sh  
b/tests/jenkins/presubmit-stage2.sh

index d4d5841..6e73394 100755
--- a/tests/jenkins/presubmit-stage2.sh
+++ b/tests/jenkins/presubmit-stage2.sh
@@ -46,5 +46,5 @@
 # Look for tests in the gem5 subdirectory
 # Once complete, run the Google Tests
 cd tests
-./main.py run -j4 -t4 gem5 && scons -C .. --no-compress-debug \
+./main.py run -j4 -t4 gem5 -vv && scons -C .. --no-compress-debug \
 build/ARM/unittests.opt
diff --git a/tests/nightly.sh b/tests/nightly.sh
index 9f69eb1..b785d55 100755
--- a/tests/nightly.sh
+++ b/tests/nightly.sh
@@ -78,7 +78,7 @@
 # Run the gem5 long tests.
 docker run -u $UID:$GID --volume "${gem5_root}":"${gem5_root}" -w \
 "${gem5_root}"/tests --rm  
gcr.io/gem5-test/ubuntu-20.04_all-dependencies \

-./main.py run --length long -j${threads} -t${threads}
+./main.py run --length long -j${threads} -t${threads} -vv

 # Run the GPU tests.
 # For the GPU tests we compile and run GCN3_X86 inside a gcn-gpu container.
diff --git a/tests/weekly.sh b/tests/weekly.sh
index 172d955..d65ee40 100755
--- a/tests/weekly.sh
+++ b/tests/weekly.sh
@@ -42,7 +42,7 @@
 # Run the gem5 very-long tests.
 docker run -u $UID:$GID --volume "${gem5_root}":"${gem5_root}" -w \
 "${gem5_root}"/tests --rm  
gcr.io/gem5-test/ubuntu-20.04_all-dependencies \

-./main.py run --length very-long -j${threads} -t${threads}
+./main.py run --length very-long -j${threads} -t${threads} -vv

 mkdir -p tests/testing-results


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/53305
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: I14e6752d40a7c8d7189211584073ba79c88ed7d5
Gerrit-Change-Number: 53305
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: stdlib: Fix CustomResource metadata setting

2021-11-23 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/53086 )


Change subject: stdlib: Fix CustomResource metadata setting
..

stdlib: Fix CustomResource metadata setting

The 'metadata' parameter was not being passed to the AbstractResource
superclass.

Change-Id: Id25d82baa2039c992645e6807a46e7c329520bb7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53086
Reviewed-by: Bobby R. Bruce 
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
---
M src/python/gem5/resources/resource.py
1 file changed, 17 insertions(+), 1 deletion(-)

Approvals:
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/python/gem5/resources/resource.py  
b/src/python/gem5/resources/resource.py

index 3203191..0b9b128 100644
--- a/src/python/gem5/resources/resource.py
+++ b/src/python/gem5/resources/resource.py
@@ -78,7 +78,7 @@
 :param local_path: The path of the resource on the host system.
 :param metadata: Add metadata for the custom resource.
 """
-super().__init__(local_path=local_path)
+super().__init__(local_path=local_path, metadata=metadata)


 class Resource(AbstractResource):

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/53086
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: Id25d82baa2039c992645e6807a46e7c329520bb7
Gerrit-Change-Number: 53086
Gerrit-PatchSet: 2
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: stdlib: Fix CustomResource metadata setting

2021-11-22 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/53086 )



Change subject: stdlib: Fix CustomResource metadata setting
..

stdlib: Fix CustomResource metadata setting

The 'metadata' parameter was not being passed to the AbstractResource
superclass.

Change-Id: Id25d82baa2039c992645e6807a46e7c329520bb7
---
M src/python/gem5/resources/resource.py
1 file changed, 13 insertions(+), 1 deletion(-)



diff --git a/src/python/gem5/resources/resource.py  
b/src/python/gem5/resources/resource.py

index 3203191..0b9b128 100644
--- a/src/python/gem5/resources/resource.py
+++ b/src/python/gem5/resources/resource.py
@@ -78,7 +78,7 @@
 :param local_path: The path of the resource on the host system.
 :param metadata: Add metadata for the custom resource.
 """
-super().__init__(local_path=local_path)
+super().__init__(local_path=local_path, metadata=metadata)


 class Resource(AbstractResource):

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/53086
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: Id25d82baa2039c992645e6807a46e7c329520bb7
Gerrit-Change-Number: 53086
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: stdlib: Update the LupvBoard to use KernelDiskWorkload

2021-11-22 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/53085 )



Change subject: stdlib: Update the LupvBoard to use KernelDiskWorkload
..

stdlib: Update the LupvBoard to use KernelDiskWorkload

Change-Id: I5857f70e6ca61b8916792e634d20cdf827b21bd0
---
M src/python/gem5/components/boards/experimental/lupv_board.py
1 file changed, 40 insertions(+), 54 deletions(-)



diff --git a/src/python/gem5/components/boards/experimental/lupv_board.py  
b/src/python/gem5/components/boards/experimental/lupv_board.py

index 76e857e..e583389 100644
--- a/src/python/gem5/components/boards/experimental/lupv_board.py
+++ b/src/python/gem5/components/boards/experimental/lupv_board.py
@@ -25,13 +25,15 @@
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 import os
-from typing import Optional, List
+from typing import List

 from utils.override import overrides
 from ..abstract_board import AbstractBoard
 from ...processors.abstract_processor import AbstractProcessor
 from ...memory.abstract_memory_system import AbstractMemorySystem
 from ...cachehierarchies.abstract_cache_hierarchy import  
AbstractCacheHierarchy

+from ..kernel_disk_workload import KernelDiskWorkload
+from resources.resource import AbstractResource
 from isas import ISA
 from utils.requires import requires

@@ -56,8 +58,6 @@
 LupioSYS,
 LupV,
 AddrRange,
-CowDiskImage,
-RawDiskImage,
 Frequency,
 Port,
 )
@@ -71,7 +71,7 @@
 FdtState,
 )

-class LupvBoard(AbstractBoard):
+class LupvBoard(AbstractBoard, KernelDiskWorkload):
 """
 A board capable of full system simulation for RISC-V.
 This board uses a set of LupIO education-friendly devices.
@@ -274,56 +274,7 @@
 self.mem_ranges = [AddrRange(start=0x8000, size=mem_size)]
 memory.set_memory_range(self.mem_ranges)

-def set_workload(
-self, bootloader: str, disk_image: str, command: Optional[str] =  
None

-):
-"""Setup the full system files
-See https://github.com/darchr/lupio-gem5/blob/lupio/README.md
-for running the full system, and downloading the right files to do  
so.

-The command passes in a boot loader and disk image, as well as the
-script to start the simulaiton.
-After the workload is set up, this function will generate the  
device

-tree file and output it to the output directory.
-
-**Limitations**
-* Only supports a Linux kernel
-* Must use the provided bootloader and disk image as denoted in the
-README above.
-"""
-self.workload.object_file = bootloader
-# Set the disk image for the block device to use
-image = CowDiskImage(
-child=RawDiskImage(read_only=True),
-read_only=False
-)
-image.child.image_file = disk_image
-self.lupio_blk.image = image
-
-# Linux boot command flags
-kernel_cmd = [
-"earlycon console=ttyLIO0",
-"root=/dev/lda1",
-"ro"
-]
-self.workload.command_line = " ".join(kernel_cmd)
-
-# Note: This must be called after set_workload because it looks  
for an

-# attribute named "disk" and connects
-self._setup_io_devices()
-self._setup_pma()
-
-# Default DTB address if bbl is built with --with-dts option
-self.workload.dtb_addr = 0x87E0
-
-# We need to wait to generate the device tree until after the disk  
is
-# set up. Now that the disk and workload are set, we can generate  
the

-# device tree file.
-self.generate_device_tree(m5.options.outdir)
-self.workload.dtb_filename = os.path.join(
-m5.options.outdir, "device.dtb"
-)
-
-def generate_device_tree(self, outdir: str) -> None:
+def _generate_device_tree(self, outdir: str) -> None:
 """Creates the dtb and dts files.
 Creates two files in the outdir: 'device.dtb' and 'device.dts'
 :param outdir: Directory to output the files
@@ -566,3 +517,29 @@
 fdt.add_rootnode(root)
 fdt.writeDtsFile(os.path.join(outdir, "device.dts"))
 fdt.writeDtbFile(os.path.join(outdir, "device.dtb"))
+
+@overrides(KernelDiskWorkload)
+def get_default_kernel_args(self) -> List[str]:
+return ["earlycon console=ttyLIO0", "root={root_value}", "ro"]
+
+@overrides(KernelDiskWorkload)
+def get_disk_device(self) -> str:
+return "/dev/lda"
+
+@overrides(KernelDiskWorkload)
+def _add_disk_to_board(self, disk_image: AbstractResource) -> None:
+# Note: This must be called after set_workload because it looks  
for an

+# attribute named "disk" and connects
+self._setup_io_devices()
+self._setup_pma()
+
+# Default DTB address if bbl is built with 

[gem5-dev] Change in gem5/gem5[develop]: stdlib: Update the LupvBoard to use 'requires'

2021-11-22 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/53084 )



Change subject: stdlib: Update the LupvBoard to use 'requires'
..

stdlib: Update the LupvBoard to use 'requires'

Usage of this function was previously avoided due to a bug which has
since been fixed:
https://gem5-review.googlesource.com/c/public/gem5/+/53003

Change-Id: Idc76ca26d02dcfbb290cebcca297e50e905d8e6d
---
M src/python/gem5/components/boards/experimental/lupv_board.py
1 file changed, 17 insertions(+), 7 deletions(-)



diff --git a/src/python/gem5/components/boards/experimental/lupv_board.py  
b/src/python/gem5/components/boards/experimental/lupv_board.py

index 423e3d9..76e857e 100644
--- a/src/python/gem5/components/boards/experimental/lupv_board.py
+++ b/src/python/gem5/components/boards/experimental/lupv_board.py
@@ -33,7 +33,7 @@
 from ...memory.abstract_memory_system import AbstractMemorySystem
 from ...cachehierarchies.abstract_cache_hierarchy import  
AbstractCacheHierarchy

 from isas import ISA
-from runtime import get_runtime_isa
+from utils.requires import requires

 import m5
 from m5.objects import (
@@ -89,15 +89,12 @@
 cache_hierarchy: AbstractCacheHierarchy,
 ) -> None:

-super().__init__(clk_freq, processor, memory, cache_hierarchy)
-if get_runtime_isa() != ISA.RISCV:
-raise EnvironmentError(
-"RiscvBoard will only work with the RISC-V ISA. Please"
-" recompile gem5 with ISA=RISCV."
-)
+requires(isa_required=ISA.RISCV)
 if cache_hierarchy.is_ruby():
 raise EnvironmentError("RiscvBoard is not compatible with  
Ruby")


+super().__init__(clk_freq, processor, memory, cache_hierarchy)
+
 @overrides(AbstractBoard)
 def _setup_board(self) -> None:


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/53084
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: Idc76ca26d02dcfbb290cebcca297e50e905d8e6d
Gerrit-Change-Number: 53084
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: stdlib: Update the LupvBoard to account for stdlib changes

2021-11-22 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/53083 )



Change subject: stdlib: Update the LupvBoard to account for stdlib changes
..

stdlib: Update the LupvBoard to account for stdlib changes

This patch updates the board to account for the following changes:

* https://gem5-review.googlesource.com/c/public/gem5/+/51790
* https://gem5-review.googlesource.com/c/public/gem5/+/52184
* https://gem5-review.googlesource.com/c/public/gem5/+/52183

These changes, broadly speaking, remove the SimpeBoard as a superclass
and instead have all the boards inherit directly from the AbstractBoard.
It also fixes the order of operations (the order in which components are
incorporated and the board it setup).

Change-Id: I829ed515da28163cafbd292a9c141be4d350636e
---
M src/python/gem5/components/boards/experimental/lupv_board.py
1 file changed, 42 insertions(+), 5 deletions(-)



diff --git a/src/python/gem5/components/boards/experimental/lupv_board.py  
b/src/python/gem5/components/boards/experimental/lupv_board.py

index 28aa209..423e3d9 100644
--- a/src/python/gem5/components/boards/experimental/lupv_board.py
+++ b/src/python/gem5/components/boards/experimental/lupv_board.py
@@ -25,10 +25,9 @@
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 import os
-from typing import Optional
+from typing import Optional, List

 from utils.override import overrides
-from ..simple_board import SimpleBoard
 from ..abstract_board import AbstractBoard
 from ...processors.abstract_processor import AbstractProcessor
 from ...memory.abstract_memory_system import AbstractMemorySystem
@@ -72,7 +71,7 @@
 FdtState,
 )

-class LupvBoard(SimpleBoard):
+class LupvBoard(AbstractBoard):
 """
 A board capable of full system simulation for RISC-V.
 This board uses a set of LupIO education-friendly devices.
@@ -89,6 +88,7 @@
 memory: AbstractMemorySystem,
 cache_hierarchy: AbstractCacheHierarchy,
 ) -> None:
+
 super().__init__(clk_freq, processor, memory, cache_hierarchy)
 if get_runtime_isa() != ISA.RISCV:
 raise EnvironmentError(
@@ -97,6 +97,10 @@
 )
 if cache_hierarchy.is_ruby():
 raise EnvironmentError("RiscvBoard is not compatible with  
Ruby")

+
+@overrides(AbstractBoard)
+def _setup_board(self) -> None:
+
 self.workload = RiscvLinux()

 # Initialize all the devices that we want to use on this board
@@ -240,6 +244,19 @@
 )

 @overrides(AbstractBoard)
+def has_dma_ports(self) -> bool:
+return False
+
+@overrides(AbstractBoard)
+def get_dma_ports(self) -> List[Port]:
+raise NotImplementedError(
+"The LupvBoard does not have DMA Ports. "
+"Use `has_dma_ports()` to check this."
+)
+
+@overrides(AbstractBoard)
+
+@overrides(AbstractBoard)
 def has_io_bus(self) -> bool:
 return True

@@ -254,7 +271,7 @@
 return self.iobus.mem_side_ports

 @overrides(AbstractBoard)
-def setup_memory_ranges(self):
+def _setup_memory_ranges(self):
 memory = self.get_memory()
 mem_size = memory.get_size()
 self.mem_ranges = [AddrRange(start=0x8000, size=mem_size)]
@@ -502,7 +519,7 @@
 FdtPropertyWords("interrupt-parent",
 state.phandle(self.lupio_pic)))
 soc_node.append(lupio_rng_node)
-
+@overrides(AbstractBoard)
 #LupioSYS Device
 lupio_sys = self.lupio_sys
 lupio_sys_node = lupio_sys.generateBasicPioDeviceNode(soc_state,

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/53083
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: I829ed515da28163cafbd292a9c141be4d350636e
Gerrit-Change-Number: 53083
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: stdlib: Fix enum comparison in 'requires'

2021-11-22 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/53003 )


Change subject: stdlib: Fix enum comparison in 'requires'
..

stdlib: Fix enum comparison in 'requires'

Change-Id: Iff8e6edcbb553e8180c21c583d79b689f9a40bce
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53003
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M src/python/gem5/utils/requires.py
1 file changed, 16 insertions(+), 2 deletions(-)

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




diff --git a/src/python/gem5/utils/requires.py  
b/src/python/gem5/utils/requires.py

index 76a8b41..7789254 100644
--- a/src/python/gem5/utils/requires.py
+++ b/src/python/gem5/utils/requires.py
@@ -72,7 +72,7 @@
 runtime_coherence_protocol = get_runtime_coherence_protocol()
 kvm_available = os.access("/dev/kvm", mode=os.R_OK | os.W_OK)

-if isa_required != None and isa_required != runtime_isa:
+if isa_required != None and isa_required.value != runtime_isa.value:
 raise Exception(
 _get_exception_str(
 msg="The current ISA is '{}'. Required: '{}'".format(
@@ -83,7 +83,8 @@

 if (
 coherence_protocol_required != None
-and coherence_protocol_required != runtime_coherence_protocol
+and coherence_protocol_required.value
+!= runtime_coherence_protocol.value
 ):
 raise Exception(
 _get_exception_str(

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/53003
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: Iff8e6edcbb553e8180c21c583d79b689f9a40bce
Gerrit-Change-Number: 53003
Gerrit-PatchSet: 5
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: tests: Removing unittests for .perf and .prof

2021-11-22 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52983 )


Change subject: tests: Removing unittests for .perf and .prof
..

tests: Removing unittests for .perf and .prof

.perf and .prof no longer exist as build targets. We now only test .opt
and .debug as of this commit.

Change-Id: Ieaf93edd33fe64330d50c6d446bfd21f9f07a895
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52983
Reviewed-by: Bobby R. Bruce 
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
---
M tests/nightly.sh
1 file changed, 16 insertions(+), 2 deletions(-)

Approvals:
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/tests/nightly.sh b/tests/nightly.sh
index 41db369..9f69eb1 100755
--- a/tests/nightly.sh
+++ b/tests/nightly.sh
@@ -74,8 +74,6 @@
 # Run the unit tests.
 unit_test opt
 unit_test debug
-unit_test perf
-unit_test prof

 # Run the gem5 long tests.
 docker run -u $UID:$GID --volume "${gem5_root}":"${gem5_root}" -w \

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/52983
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: Ieaf93edd33fe64330d50c6d446bfd21f9f07a895
Gerrit-Change-Number: 52983
Gerrit-PatchSet: 3
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: tests: Removing unittests for .perf and .prof

2021-11-19 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52983 )



Change subject: tests: Removing unittests for .perf and .prof
..

tests: Removing unittests for .perf and .prof

.perf and .prof no longer exist as build targets. We now only test .opt
and .fast as of this commit.

Change-Id: Ieaf93edd33fe64330d50c6d446bfd21f9f07a895
---
M tests/nightly.sh
1 file changed, 12 insertions(+), 2 deletions(-)



diff --git a/tests/nightly.sh b/tests/nightly.sh
index 41db369..9f69eb1 100755
--- a/tests/nightly.sh
+++ b/tests/nightly.sh
@@ -74,8 +74,6 @@
 # Run the unit tests.
 unit_test opt
 unit_test debug
-unit_test perf
-unit_test prof

 # Run the gem5 long tests.
 docker run -u $UID:$GID --volume "${gem5_root}":"${gem5_root}" -w \

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/52983
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: Ieaf93edd33fe64330d50c6d446bfd21f9f07a895
Gerrit-Change-Number: 52983
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: stdlib: Fix RISCVBoard when running O3 CPU with Ruby

2021-11-18 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52963 )


Change subject: stdlib: Fix RISCVBoard when running O3 CPU with Ruby
..

stdlib: Fix RISCVBoard when running O3 CPU with Ruby

The long/nightly tests were failing,
https://jenkins.gem5.org/job/nightly/47, due to a misconfiguration in
the RISCVBoard that caused a "fatal: Unable to find destination " error
when running the O3 CPU with a Ruby cache coherence protocol.

This patch resolves the issue by adding a "BadAddr" to handle bad
addresses occasionally produced by the O3 CPU.

Change-Id: I07fe06544e7588f45984032a022e73cd41d8a1e6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52963
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M src/python/gem5/components/boards/riscv_board.py
1 file changed, 24 insertions(+), 0 deletions(-)

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




diff --git a/src/python/gem5/components/boards/riscv_board.py  
b/src/python/gem5/components/boards/riscv_board.py

index 8945f22..7c5b547 100644
--- a/src/python/gem5/components/boards/riscv_board.py
+++ b/src/python/gem5/components/boards/riscv_board.py
@@ -42,6 +42,7 @@
 import m5

 from m5.objects import (
+BadAddr,
 Bridge,
 PMAChecker,
 RiscvLinux,
@@ -107,6 +108,8 @@

 # Incoherent I/O bus
 self.iobus = IOXBar()
+self.iobus.badaddr_responder = BadAddr()
+self.iobus.default = self.iobus.badaddr_responder.pio

 # The virtio disk
 self.disk = RiscvMmioVirtIO(

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/52963
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: I07fe06544e7588f45984032a022e73cd41d8a1e6
Gerrit-Change-Number: 52963
Gerrit-PatchSet: 2
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: stdlib: Fix RISCVBoard when running O3 CPU with Ruby

2021-11-18 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52963 )



Change subject: stdlib: Fix RISCVBoard when running O3 CPU with Ruby
..

stdlib: Fix RISCVBoard when running O3 CPU with Ruby

The long/nightly tests were failing,
https://jenkins.gem5.org/job/nightly/47, due to a misconfiguration in
the RISCVBoard that caused a "fatal: Unable to find destination " error
when running the O3 CPU with a Ruby cache coherence protocol.

This patch resolves the issue by adding a "BadAddr" to handle bad
addresses occasionally produced by the O3 CPU.

Change-Id: I07fe06544e7588f45984032a022e73cd41d8a1e6
---
M src/python/gem5/components/boards/riscv_board.py
1 file changed, 20 insertions(+), 0 deletions(-)



diff --git a/src/python/gem5/components/boards/riscv_board.py  
b/src/python/gem5/components/boards/riscv_board.py

index 8945f22..7c5b547 100644
--- a/src/python/gem5/components/boards/riscv_board.py
+++ b/src/python/gem5/components/boards/riscv_board.py
@@ -42,6 +42,7 @@
 import m5

 from m5.objects import (
+BadAddr,
 Bridge,
 PMAChecker,
 RiscvLinux,
@@ -107,6 +108,8 @@

 # Incoherent I/O bus
 self.iobus = IOXBar()
+self.iobus.badaddr_responder = BadAddr()
+self.iobus.default = self.iobus.badaddr_responder.pio

 # The virtio disk
 self.disk = RiscvMmioVirtIO(

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/52963
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: I07fe06544e7588f45984032a022e73cd41d8a1e6
Gerrit-Change-Number: 52963
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: stdlib,tests: Fix boot_kvm_fork_run.py

2021-11-16 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52663 )


 (

4 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the  
submitted one.

 )Change subject: stdlib,tests: Fix boot_kvm_fork_run.py
..

stdlib,tests: Fix boot_kvm_fork_run.py

The patch
https://gem5-review.googlesource.com/c/public/gem5/+/51949
changed the way in which kernel arguments were passed to the
'set_kernel_disk_workload' function. The 'kernel_args' parameter
overrides the kernel arguments, not amends them as before. This test
script was not updated to take into account this functionality, and, as
such, the test failed. This patch fixes this.

Change-Id: I737c59329acde3a064f933bc4d31e20cf6ca55ae
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52663
Tested-by: kokoro 
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
---
M tests/gem5/configs/boot_kvm_fork_run.py
1 file changed, 24 insertions(+), 1 deletion(-)

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




diff --git a/tests/gem5/configs/boot_kvm_fork_run.py  
b/tests/gem5/configs/boot_kvm_fork_run.py

index 10c198d..14d6a4b 100644
--- a/tests/gem5/configs/boot_kvm_fork_run.py
+++ b/tests/gem5/configs/boot_kvm_fork_run.py
@@ -194,6 +194,8 @@
 cache_hierarchy=cache_hierarchy,
 )

+kernel_args = motherboard.get_default_kernel_args() + [args.kernel_args]
+
 # Set the Full System workload.
 motherboard.set_kernel_disk_workload(
 kernel=Resource(
@@ -210,7 +212,7 @@
 m5 exit # exit in children and parent
 """
 ),
-kernel_args=[args.kernel_args]
+kernel_args=kernel_args
 )



--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/52663
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: I737c59329acde3a064f933bc4d31e20cf6ca55ae
Gerrit-Change-Number: 52663
Gerrit-PatchSet: 6
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: stdlib: Fix component incorporation ordering

2021-11-16 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52843 )


Change subject: stdlib: Fix component incorporation ordering
..

stdlib: Fix component incorporation ordering

Running with KVM cores was not possible with the previous ordering. The
processor must be incorporated after the cache hierarchy when using a
KVM core. A more detailed account of this bug is noted here:
https://gem5.atlassian.net/browse/GEM5-1113

This patch only partially fixes the problem. Ideally the component
incorporation order should not cause problems.

Change-Id: I4bb69ffe7963ba3708458cff7f2b09e9e75830a7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52843
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M src/python/gem5/components/boards/abstract_board.py
1 file changed, 33 insertions(+), 5 deletions(-)

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




diff --git a/src/python/gem5/components/boards/abstract_board.py  
b/src/python/gem5/components/boards/abstract_board.py

index 9bfac8f..4055e17 100644
--- a/src/python/gem5/components/boards/abstract_board.py
+++ b/src/python/gem5/components/boards/abstract_board.py
@@ -234,17 +234,24 @@
 The order of this board is always:

 1. Connect the memory.
-2. Connect the processor.
-3. Connect the cache hierarchy.
+2. Connect the cache hierarchy.
+3. Connect the processor.

 Developers may build upon this assumption when creating components.
+
+Notes
+-
+
+* The processor is incorporated after the cache hierarchy due to a  
bug

+noted here: https://gem5.atlassian.net/browse/GEM5-1113. Until this
+bug is fixed, this ordering must be maintained.
 """

 # Incorporate the memory into the motherboard.
 self.get_memory().incorporate_memory(self)

-# Incorporate the processor into the motherboard.
-self.get_processor().incorporate_processor(self)
-
 # Incorporate the cache hierarchy for the motherboard.
 self.get_cache_hierarchy().incorporate_cache(self)
+
+# Incorporate the processor into the motherboard.
+self.get_processor().incorporate_processor(self)

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/52843
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: I4bb69ffe7963ba3708458cff7f2b09e9e75830a7
Gerrit-Change-Number: 52843
Gerrit-PatchSet: 4
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: stdlib: Call `setup_memory_ranges()` from the constructor

2021-11-16 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52883 )


Change subject: stdlib: Call `setup_memory_ranges()` from the constructor
..

stdlib: Call `setup_memory_ranges()` from the constructor

`setup_memory_ranges()`, now `_setup_memory_ranges()`, had to be called
by subclasses. Since `setup_memory_ranges() was always called at the top
of the `_setup_board()` function (or could be), this function is now
automatically called within the AbstractBoard's constructor prior to
`_setup_board` and `_connect_things`.

Change-Id: I6bf3231666b86059ffc484cfca44e45cfde52ea6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52883
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M src/python/gem5/components/boards/simple_board.py
M src/python/gem5/components/boards/riscv_board.py
M src/python/gem5/components/boards/test_board.py
M src/python/gem5/components/boards/x86_board.py
M src/python/gem5/components/boards/abstract_board.py
5 files changed, 45 insertions(+), 24 deletions(-)

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




diff --git a/src/python/gem5/components/boards/abstract_board.py  
b/src/python/gem5/components/boards/abstract_board.py

index 4055e17..a27cecd 100644
--- a/src/python/gem5/components/boards/abstract_board.py
+++ b/src/python/gem5/components/boards/abstract_board.py
@@ -86,6 +86,8 @@
 self.memory = memory
 self.cache_hierarchy = cache_hierarchy

+# Setup the board and memory system's memory ranges.
+self._setup_memory_ranges()

 # Setup board properties unique to the board being constructed.
 self._setup_board()
@@ -143,8 +145,9 @@
 """
 This function is called in the AbstractBoard constructor, before  
the
 memory, processor, and cache hierarchy components are incorporated  
via

-`_connect_thing()`. This function should be overridden by boards to
-specify components, connections unique to that board.
+`_connect_thing()`, but after the `_setup_memory_ranges()`  
function.

+This function should be overridden by boards to specify components,
+connections unique to that board.
 """
 raise NotImplementedError

@@ -212,18 +215,24 @@
 raise NotImplementedError

 @abstractmethod
-def setup_memory_ranges(self) -> None:
+def _setup_memory_ranges(self) -> None:
 """
-Set the memory ranges for this board.
+Set the memory ranges for this board and memory system.

-This is called by at the end of the constructor. It can query the
-board's memory to determine the size and the set the memory ranges  
on

-the memory if it needs to move the memory devices.
+This is called in the constructor, prior to `_setup_board` and
+`_connect_things`. It should query the board's memory to determine  
the

+size and the set the memory ranges on the memory system and on the
+board.

-The simplest implementation just sets the board's memory range to  
be

-the size of memory and memory's memory range to be the same as the
-board. Full system implementations will likely need something more
-complicated.
+The simplest implementation sets the board's memory range to the  
size
+of memory and memory system's range to be the same as the board.  
Full

+system implementations will likely need something more complicated.
+
+Notes
+-
+* This *must* be called prior to the incorporation of the cache
+hierarchy (via `_connect_things`) as cache hierarchies depend upon
+knowing the memory system's ranges.
 """
 raise NotImplementedError

diff --git a/src/python/gem5/components/boards/riscv_board.py  
b/src/python/gem5/components/boards/riscv_board.py

index f64640c..8945f22 100644
--- a/src/python/gem5/components/boards/riscv_board.py
+++ b/src/python/gem5/components/boards/riscv_board.py
@@ -121,9 +121,6 @@
 self._on_chip_devices = [self.platform.clint, self.platform.plic]
 self._off_chip_devices = [self.platform.uart, self.disk]

-# Set up the memory ranges
-self.setup_memory_ranges()
-
 def _setup_io_devices(self) -> None:
 """Connect the I/O devices to the I/O bus"""

@@ -189,7 +186,7 @@
 return self.iobus.mem_side_ports

 @overrides(AbstractBoard)
-def setup_memory_ranges(self):
+def _setup_memory_ranges(self):
 memory = self.get_memory()
 mem_size = memory.get_size()
 self.mem_ranges = [AddrRange(start=0x8000, size=mem_size)]
diff --git a/src/python/gem5/components/boards/simple_board.py  
b/src/python/gem5/components/boards/simple_board.py

index c011132..d0f4f2a 

[gem5-dev] Change in gem5/gem5[develop]: stdlib: Call `setup_memory_ranges()` from the constructor

2021-11-15 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52883 )



Change subject: stdlib: Call `setup_memory_ranges()` from the constructor
..

stdlib: Call `setup_memory_ranges()` from the constructor

`setup_memory_ranges()`, now `_setup_memory_ranges()`, had to be called
by subclasses. Since `setup_memory_ranges() was always called at the top
of the `_setup_board()` function (or could be), this function is now
automatically called within the AbstractBoard's constructor prior to
`_setup_board` and `_connect_things`.

Change-Id: I6bf3231666b86059ffc484cfca44e45cfde52ea6
---
M src/python/gem5/components/boards/simple_board.py
M src/python/gem5/components/boards/riscv_board.py
M src/python/gem5/components/boards/test_board.py
M src/python/gem5/components/boards/x86_board.py
M src/python/gem5/components/boards/abstract_board.py
5 files changed, 41 insertions(+), 24 deletions(-)



diff --git a/src/python/gem5/components/boards/abstract_board.py  
b/src/python/gem5/components/boards/abstract_board.py

index 4055e17..a27cecd 100644
--- a/src/python/gem5/components/boards/abstract_board.py
+++ b/src/python/gem5/components/boards/abstract_board.py
@@ -86,6 +86,8 @@
 self.memory = memory
 self.cache_hierarchy = cache_hierarchy

+# Setup the board and memory system's memory ranges.
+self._setup_memory_ranges()

 # Setup board properties unique to the board being constructed.
 self._setup_board()
@@ -143,8 +145,9 @@
 """
 This function is called in the AbstractBoard constructor, before  
the
 memory, processor, and cache hierarchy components are incorporated  
via

-`_connect_thing()`. This function should be overridden by boards to
-specify components, connections unique to that board.
+`_connect_thing()`, but after the `_setup_memory_ranges()`  
function.

+This function should be overridden by boards to specify components,
+connections unique to that board.
 """
 raise NotImplementedError

@@ -212,18 +215,24 @@
 raise NotImplementedError

 @abstractmethod
-def setup_memory_ranges(self) -> None:
+def _setup_memory_ranges(self) -> None:
 """
-Set the memory ranges for this board.
+Set the memory ranges for this board and memory system.

-This is called by at the end of the constructor. It can query the
-board's memory to determine the size and the set the memory ranges  
on

-the memory if it needs to move the memory devices.
+This is called in the constructor, prior to `_setup_board` and
+`_connect_things`. It should query the board's memory to determine  
the

+size and the set the memory ranges on the memory system and on the
+board.

-The simplest implementation just sets the board's memory range to  
be

-the size of memory and memory's memory range to be the same as the
-board. Full system implementations will likely need something more
-complicated.
+The simplest implementation sets the board's memory range to the  
size
+of memory and memory system's range to be the same as the board.  
Full

+system implementations will likely need something more complicated.
+
+Notes
+-
+* This *must* be called prior to the incorporation of the cache
+hierarchy (via `_connect_things`) as cache hierarchies depend upon
+knowing the memory system's ranges.
 """
 raise NotImplementedError

diff --git a/src/python/gem5/components/boards/riscv_board.py  
b/src/python/gem5/components/boards/riscv_board.py

index f64640c..8945f22 100644
--- a/src/python/gem5/components/boards/riscv_board.py
+++ b/src/python/gem5/components/boards/riscv_board.py
@@ -121,9 +121,6 @@
 self._on_chip_devices = [self.platform.clint, self.platform.plic]
 self._off_chip_devices = [self.platform.uart, self.disk]

-# Set up the memory ranges
-self.setup_memory_ranges()
-
 def _setup_io_devices(self) -> None:
 """Connect the I/O devices to the I/O bus"""

@@ -189,7 +186,7 @@
 return self.iobus.mem_side_ports

 @overrides(AbstractBoard)
-def setup_memory_ranges(self):
+def _setup_memory_ranges(self):
 memory = self.get_memory()
 mem_size = memory.get_size()
 self.mem_ranges = [AddrRange(start=0x8000, size=mem_size)]
diff --git a/src/python/gem5/components/boards/simple_board.py  
b/src/python/gem5/components/boards/simple_board.py

index c011132..d0f4f2a 100644
--- a/src/python/gem5/components/boards/simple_board.py
+++ b/src/python/gem5/components/boards/simple_board.py
@@ -67,8 +67,7 @@

 @overrides(AbstractBoard)
 def _setup_board(self) -> None:
-# Set up the memory ranges
-

[gem5-dev] Change in gem5/gem5[develop]: stdlib: Fix component incorporation ordering

2021-11-14 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52843 )



Change subject: stdlib: Fix component incorporation ordering
..

stdlib: Fix component incorporation ordering

Running with KVM cores was not possible with the previous ordering. The
processor must be incorporated before the cache hierarchy when using a
KVM core. A more detailed account of this bug is noted here:
https://gem5.atlassian.net/browse/GEM5-1113

This patch only partially fixes the problem. Ideally the component
incorporation order should not cause problems.

Change-Id: I4bb69ffe7963ba3708458cff7f2b09e9e75830a7
---
M src/python/gem5/components/boards/abstract_board.py
1 file changed, 22 insertions(+), 5 deletions(-)



diff --git a/src/python/gem5/components/boards/abstract_board.py  
b/src/python/gem5/components/boards/abstract_board.py

index 9bfac8f..020c8f0 100644
--- a/src/python/gem5/components/boards/abstract_board.py
+++ b/src/python/gem5/components/boards/abstract_board.py
@@ -234,8 +234,8 @@
 The order of this board is always:

 1. Connect the memory.
-2. Connect the processor.
-3. Connect the cache hierarchy.
+2. Connect the cache hierarchy.
+3. Connect the processor.

 Developers may build upon this assumption when creating components.
 """
@@ -243,8 +243,8 @@
 # Incorporate the memory into the motherboard.
 self.get_memory().incorporate_memory(self)

-# Incorporate the processor into the motherboard.
-self.get_processor().incorporate_processor(self)
-
 # Incorporate the cache hierarchy for the motherboard.
 self.get_cache_hierarchy().incorporate_cache(self)
+
+# Incorporate the processor into the motherboard.
+self.get_processor().incorporate_processor(self)

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/52843
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: I4bb69ffe7963ba3708458cff7f2b09e9e75830a7
Gerrit-Change-Number: 52843
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: tests: Fix boot_kvm_fork_run.py

2021-11-10 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52663 )



Change subject: tests: Fix boot_kvm_fork_run.py
..

tests: Fix boot_kvm_fork_run.py

The patch
https://gem5-review.googlesource.com/c/public/gem5/+/51949
changed the way in which kernel arguments were passed to the
'set_kernel_disk_workload' function. The 'kernel_args' parameter
overrides the kernel arguments, not amends them as before. This test
script was not updated to take into account this functionality, and, as
such, the test failed. This patch fixes this.

Change-Id: I737c59329acde3a064f933bc4d31e20cf6ca55ae
---
M tests/gem5/configs/boot_kvm_fork_run.py
1 file changed, 20 insertions(+), 1 deletion(-)



diff --git a/tests/gem5/configs/boot_kvm_fork_run.py  
b/tests/gem5/configs/boot_kvm_fork_run.py

index 507acee..edbd26e 100644
--- a/tests/gem5/configs/boot_kvm_fork_run.py
+++ b/tests/gem5/configs/boot_kvm_fork_run.py
@@ -203,6 +203,8 @@

 motherboard.connect_things()

+kernal_args = motherboard.get_default_kernel_args() + [args.kernel_args]
+
 # Set the Full System workload.
 motherboard.set_kernel_disk_workload(
 kernel=Resource(
@@ -221,7 +223,7 @@
 m5 exit # exit in children and parent
 """
 ),
-kernel_args=[args.kernel_args]
+kernel_args=kernal_args
 )



--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/52663
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: I737c59329acde3a064f933bc4d31e20cf6ca55ae
Gerrit-Change-Number: 52663
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: tests: Fix riscv boot exit tests

2021-11-10 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52644 )



Change subject: tests: Fix riscv boot exit tests
..

tests: Fix riscv boot exit tests

Due to this change:
https://gem5-review.googlesource.com/c/public/gem5/+/52089
full RISCV boot tests were added, which makes the "tick_exit" parameter
optional (left to 'None' if simulating a full boot). However, the
simulation function was not updated to not pass the "tick_exit"
parameter if not set. This cause an error. This patch fixes this.

Change-Id: I9c62a6a46d9334a2e9fbad2221b42a1ff4843a54
---
M tests/gem5/configs/riscv_boot_exit_run.py
1 file changed, 20 insertions(+), 1 deletion(-)



diff --git a/tests/gem5/configs/riscv_boot_exit_run.py  
b/tests/gem5/configs/riscv_boot_exit_run.py

index 4f0c49f..8add619 100644
--- a/tests/gem5/configs/riscv_boot_exit_run.py
+++ b/tests/gem5/configs/riscv_boot_exit_run.py
@@ -159,7 +159,10 @@

 m5.instantiate()

-exit_event = m5.simulate(args.tick_exit)
+if args.tick_exit:
+exit_event = m5.simulate(args.tick_exit)
+else:
+exit_event = m5.simulate()
 print(
 "Exiting @ tick {} because {}.".format(m5.curTick(),  
exit_event.getCause())

 )

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/52644
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: I9c62a6a46d9334a2e9fbad2221b42a1ff4843a54
Gerrit-Change-Number: 52644
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: tests: Remove 'override-download' flag from insttest

2021-11-10 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52643 )



Change subject: tests: Remove 'override-download' flag from insttest
..

tests: Remove 'override-download' flag from insttest

This flag was previously passed to the 'simple_binary_run.py' to
override downloads. However, since this patch:
https://gem5-review.googlesource.com/c/public/gem5/+/52086
we no longer use the flag. It appears in this patch the insttest test
was not updated and, as such, this test failed:
https://jenkins.gem5.org/job/nightly/38/

This, in part, will fix the nightly build.

Change-Id: I4fb5ab175c73687304c04fe426f81519d23574a7
---
M tests/gem5/insttest_se/test.py
1 file changed, 18 insertions(+), 1 deletion(-)



diff --git a/tests/gem5/insttest_se/test.py b/tests/gem5/insttest_se/test.py
index 0464a9e..25c8823 100644
--- a/tests/gem5/insttest_se/test.py
+++ b/tests/gem5/insttest_se/test.py
@@ -60,7 +60,6 @@
 config_args=[
 binary,
 cpu,
-"--override-download",
 "--resource-directory",
 resource_path,
 ],

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/52643
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: I4fb5ab175c73687304c04fe426f81519d23574a7
Gerrit-Change-Number: 52643
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: tests: Move MI_Example tests to Long/Nightly

2021-11-09 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52563 )


Change subject: tests: Move MI_Example tests to Long/Nightly
..

tests: Move MI_Example tests to Long/Nightly

Two tests, one in test_kvm_fork_run.py and another in
test_kvm_cpu_switch.py, were trying to run the MI_Example protocol as
part of the quick/kokoro run. MI_Example requires the building of X86,
though we try to use GCN3_X86 exclusively to avoid compiling an
additional target. As such, these MI_Example tests have been moved to
the long/nightly run.

Change-Id: I3c196e7e336148a1b7a124b5810348a2e587fe24
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52563
Reviewed-by: Gabe Black 
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M tests/gem5/kvm-fork-tests/test_kvm_fork_run.py
M tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py
2 files changed, 27 insertions(+), 6 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
  Gabe Black: Looks good to me, but someone else must approve
  kokoro: Regressions pass




diff --git a/tests/gem5/kvm-fork-tests/test_kvm_fork_run.py  
b/tests/gem5/kvm-fork-tests/test_kvm_fork_run.py

index fb5ff2b..bd7fd6a 100644
--- a/tests/gem5/kvm-fork-tests/test_kvm_fork_run.py
+++ b/tests/gem5/kvm-fork-tests/test_kvm_fork_run.py
@@ -107,15 +107,15 @@
 cpu="timing", num_cpus=4, mem_system="classic",  
length=constants.quick_tag

 )

+### The long (nightly) tests 
+
 test_kvm_fork_run(
 cpu="timing",
 num_cpus=4,
 mem_system="mi_example",
-length=constants.quick_tag,
+length=constants.long_tag,
 )

-### The long (nightly) tests 
-
 test_kvm_fork_run(
 cpu="timing",
 num_cpus=1,
diff --git a/tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py  
b/tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py

index 718189c..0ca32db 100644
--- a/tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py
+++ b/tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py
@@ -105,15 +105,15 @@
 cpu="timing", num_cpus=4, mem_system="classic",  
length=constants.quick_tag

 )

+### The long (nightly) tests 
+
 test_kvm_switch(
 cpu="timing",
 num_cpus=4,
 mem_system="mi_example",
-length=constants.quick_tag,
+length=constants.long_tag,
 )

-### The long (nightly) tests 
-
 test_kvm_switch(
 cpu="timing",
 num_cpus=1,

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/52563
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: I3c196e7e336148a1b7a124b5810348a2e587fe24
Gerrit-Change-Number: 52563
Gerrit-PatchSet: 2
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: stdlib: Remove unneeded imports in the gem5 Python Library

2021-11-08 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52203 )


 (

8 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the  
submitted one.

 )Change subject: stdlib: Remove unneeded imports in the gem5 Python Library
..

stdlib: Remove unneeded imports in the gem5 Python Library

Change-Id: I6d4ccc4e18bd36d4a9dad9b6782ebcc0e64c4e44
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52203
Tested-by: kokoro 
Reviewed-by: Bobby R. Bruce 
Maintainer: Bobby R. Bruce 
---
M src/python/gem5/components/boards/simple_board.py
M src/python/gem5/components/boards/test_board.py
M src/python/gem5/components/processors/simple_switchable_processor.py
M src/python/gem5/components/processors/simple_processor.py
M src/python/gem5/components/boards/x86_board.py
5 files changed, 14 insertions(+), 12 deletions(-)

Approvals:
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/python/gem5/components/boards/simple_board.py  
b/src/python/gem5/components/boards/simple_board.py

index ad11df9..2385ce4 100644
--- a/src/python/gem5/components/boards/simple_board.py
+++ b/src/python/gem5/components/boards/simple_board.py
@@ -26,11 +26,8 @@

 from m5.objects import (
 AddrRange,
-SrcClockDomain,
-VoltageDomain,
 IOXBar,
 Port,
-ClockDomain,
 )

 from .abstract_board import AbstractBoard
diff --git a/src/python/gem5/components/boards/test_board.py  
b/src/python/gem5/components/boards/test_board.py

index b591a6e..9010843 100644
--- a/src/python/gem5/components/boards/test_board.py
+++ b/src/python/gem5/components/boards/test_board.py
@@ -25,9 +25,6 @@
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 from m5.objects import (
-SrcClockDomain,
-ClockDomain,
-VoltageDomain,
 Port,
 IOXBar,
 AddrRange,
diff --git a/src/python/gem5/components/boards/x86_board.py  
b/src/python/gem5/components/boards/x86_board.py

index 51e3e25..53a577b 100644
--- a/src/python/gem5/components/boards/x86_board.py
+++ b/src/python/gem5/components/boards/x86_board.py
@@ -59,8 +59,7 @@
 from ..cachehierarchies.abstract_cache_hierarchy import  
AbstractCacheHierarchy

 from ...utils.requires import requires

-import os
-from typing import List, Optional, Sequence
+from typing import List, Sequence


 class X86Board(AbstractBoard, KernelDiskWorkload):
diff --git a/src/python/gem5/components/processors/simple_processor.py  
b/src/python/gem5/components/processors/simple_processor.py

index 8bc7f8b..4f602ed 100644
--- a/src/python/gem5/components/processors/simple_processor.py
+++ b/src/python/gem5/components/processors/simple_processor.py
@@ -35,8 +35,6 @@
 from .cpu_types import CPUTypes
 from ..boards.abstract_board import AbstractBoard

-from typing import List
-

 class SimpleProcessor(AbstractProcessor):
 """
diff --git  
a/src/python/gem5/components/processors/simple_switchable_processor.py  
b/src/python/gem5/components/processors/simple_switchable_processor.py

index 3614aca..4cc4cfb 100644
--- a/src/python/gem5/components/processors/simple_switchable_processor.py
+++ b/src/python/gem5/components/processors/simple_switchable_processor.py
@@ -32,8 +32,6 @@

 from ...utils.override import *

-from m5.objects import KvmVM
-

 class SimpleSwitchableProcessor(SwitchableProcessor):
 """

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/52203
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: I6d4ccc4e18bd36d4a9dad9b6782ebcc0e64c4e44
Gerrit-Change-Number: 52203
Gerrit-PatchSet: 10
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: stdlib,tests,configs: Create 'SEBinaryWorkload' class

2021-11-08 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52186 )


 (

10 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the  
submitted one.

 )Change subject: stdlib,tests,configs: Create 'SEBinaryWorkload' class
..

stdlib,tests,configs: Create 'SEBinaryWorkload' class

This enables an SE mode execution of binary if added a Board's
superclass.

This has been abstracted from the SimpleBoard.

The 'set_workload' function has been renamed 'set_se_binary_workload'.
This is clearer on its purpose and doesn't overlap with other
'set_workload' functions.

Change-Id: I714425a3b6b98b91e762ad076eba583bc5953ddd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52186
Tested-by: kokoro 
Reviewed-by: Bobby R. Bruce 
Maintainer: Bobby R. Bruce 
---
M src/python/gem5/components/boards/simple_board.py
M configs/example/gem5_library/arm-hello.py
M src/python/SConscript
M tests/gem5/configs/simple_binary_run.py
A src/python/gem5/components/boards/se_binary_workload.py
5 files changed, 86 insertions(+), 25 deletions(-)

Approvals:
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/configs/example/gem5_library/arm-hello.py  
b/configs/example/gem5_library/arm-hello.py

index dc4266c..540a96b 100644
--- a/configs/example/gem5_library/arm-hello.py
+++ b/configs/example/gem5_library/arm-hello.py
@@ -79,7 +79,7 @@
 # program compiled to the ARM ISA. The `Resource` class will automatically
 # download the binary from the gem5 Resources cloud bucket if it's not  
already

 # present.
-board.set_workload(
+board.set_se_binary_workload(
 # The `Resource` class reads the `resources.json` file from the gem5
 # resources repository:
 # https://gem5.googlesource.com/public/gem5-resource.
diff --git a/src/python/SConscript b/src/python/SConscript
index db564ef..d210960 100644
--- a/src/python/SConscript
+++ b/src/python/SConscript
@@ -42,6 +42,8 @@
 PySource('gem5.components.boards', 'gem5/components/boards/x86_board.py')
 PySource('gem5.components.boards',
 "gem5/components/boards/kernel_disk_workload.py")
+PySource('gem5.components.boards',
+"gem5/components/boards/se_binary_workload.py")
 PySource('gem5.components.cachehierarchies',
 'gem5/components/cachehierarchies/__init__.py')
 PySource('gem5.components.cachehierarchies',
diff --git a/src/python/gem5/components/boards/se_binary_workload.py  
b/src/python/gem5/components/boards/se_binary_workload.py

new file mode 100644
index 000..485c1a3
--- /dev/null
+++ b/src/python/gem5/components/boards/se_binary_workload.py
@@ -0,0 +1,56 @@
+# Copyright (c) 2021 The Regents of the University of California
+# 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.
+
+from ...resources.resource import AbstractResource
+
+from m5.objects import SEWorkload, Process
+
+class SEBinaryWorkload:
+"""
+This class is used to enable simple Syscall-Execution (SE) mode  
execution

+of a binary.
+
+For this to function correctly the SEBinaryWorkload class should be  
added

+as a superclass to a board (i.e., something that inherits from
+AbstractBoard).
+"""
+
+def set_se_binary_workload(self, binary: AbstractResource) -> None:
+"""Set up the system to run a specific binary.
+
+**Limitations**
+* Only supports single threaded applications
+* Dynamically 

[gem5-dev] Change in gem5/gem5[develop]: stdlib: Remove 'exit_on_work_items' from boards' constructor

2021-11-08 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52223 )


 (

6 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the  
submitted one.
 )Change subject: stdlib: Remove 'exit_on_work_items' from boards'  
constructor

..

stdlib: Remove 'exit_on_work_items' from boards' constructor

This has been moved to the `set_kernel_disk_workload` function, and is
set to True by default.

Change-Id: I9df2fa2946dd942b5011f05b948542097310352e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52223
Tested-by: kokoro 
Reviewed-by: Bobby R. Bruce 
Maintainer: Bobby R. Bruce 
---
M src/python/gem5/components/boards/simple_board.py
M src/python/gem5/components/boards/riscv_board.py
M tests/gem5/configs/boot_kvm_fork_run.py
M tests/gem5/configs/parsec_disk_run.py
M tests/gem5/configs/boot_kvm_switch_exit.py
M src/python/gem5/components/boards/x86_board.py
M src/python/gem5/components/boards/kernel_disk_workload.py
M tests/gem5/configs/x86_boot_exit_run.py
M src/python/gem5/components/boards/abstract_board.py
9 files changed, 23 insertions(+), 18 deletions(-)

Approvals:
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/python/gem5/components/boards/abstract_board.py  
b/src/python/gem5/components/boards/abstract_board.py

index ce86ab4..51555d0 100644
--- a/src/python/gem5/components/boards/abstract_board.py
+++ b/src/python/gem5/components/boards/abstract_board.py
@@ -67,7 +67,6 @@
 processor: "AbstractProcessor",
 memory: "AbstractMemory",
 cache_hierarchy: "AbstractCacheHierarchy",
-exit_on_work_items: bool = False,
 ) -> None:
 super(AbstractBoard, self).__init__()
 """
@@ -75,8 +74,6 @@
 :param processor: The processor for this board.
 :param memory: The memory for this board.
 :param cache_hierarchy: The Cachie Hierarchy for this board.
-:param exit_on_work_items: Whether the simulation should exit
-on work items.
 """

 # Set up the clock domain and the voltage domain.
@@ -84,9 +81,6 @@
 self.clk_domain.clock = clk_freq
 self.clk_domain.voltage_domain = VoltageDomain()

-# Set whether to exit on work items.
-self.exit_on_work_items = exit_on_work_items
-
 # Set the processor, memory, and cache hierarchy.
 self.processor = processor
 self.memory = memory
diff --git a/src/python/gem5/components/boards/kernel_disk_workload.py  
b/src/python/gem5/components/boards/kernel_disk_workload.py

index 424d839..031fc60 100644
--- a/src/python/gem5/components/boards/kernel_disk_workload.py
+++ b/src/python/gem5/components/boards/kernel_disk_workload.py
@@ -136,6 +136,7 @@
 readfile: Optional[str] = None,
 readfile_contents: Optional[str] = None,
 kernel_args: Optional[List[str]] = None,
+exit_on_work_items: bool = True,
 ) -> None:
 """
 This function allows the setting of a full-system run with a Kernel
@@ -151,6 +152,8 @@
 be created with the value of `readfile_contents`.
 :param kernel_args: An optional parameter for setting arguments to  
be
 passed to the kernel. By default set to  
`get_default_kernel_args()`.
+:param exit_on_work_items: Whether the simulation should exit on  
work

+items. True by default.
 """

 # Set the kernel to use.
@@ -176,3 +179,6 @@
 file.close()

 self._add_disk_to_board(disk_image=disk_image)
+
+# Set whether to exit on work items.
+self.exit_on_work_items = exit_on_work_items
\ No newline at end of file
diff --git a/src/python/gem5/components/boards/riscv_board.py  
b/src/python/gem5/components/boards/riscv_board.py

index ac8440d..f64640c 100644
--- a/src/python/gem5/components/boards/riscv_board.py
+++ b/src/python/gem5/components/boards/riscv_board.py
@@ -85,11 +85,8 @@
 processor: AbstractProcessor,
 memory: AbstractMemorySystem,
 cache_hierarchy: AbstractCacheHierarchy,
-exit_on_work_items: bool = False,
 ) -> None:
-super().__init__(
-clk_freq, processor, memory, cache_hierarchy,  
exit_on_work_items

-)
+super().__init__(clk_freq, processor, memory, cache_hierarchy)
 requires(isa_required=ISA.RISCV)

 @overrides(AbstractBoard)
diff --git a/src/python/gem5/components/boards/simple_board.py  
b/src/python/gem5/components/boards/simple_board.py

index 2385ce4..3242cf0 100644
--- a/src/python/gem5/components/boards/simple_board.py
+++ b/src/python/gem5/components/boards/simple_board.py
@@ -57,14 +57,12 @@
 processor: AbstractProcessor,
 memory: AbstractMemorySystem,
 cache_hierarchy: AbstractCacheHierarchy,
-exit_on_work_items: 

[gem5-dev] Change in gem5/gem5[develop]: stdlib,tests,configs: Replace Resource override download

2021-11-08 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52086 )


Change subject: stdlib,tests,configs: Replace Resource override download
..

stdlib,tests,configs: Replace Resource override download

The override parameter in the constructor has been renamed to to
'download_md5_mismatch'. This makes the purpose of this parameter
clearer.

The default value has been changed from False to True. We found in most
cases we want to re-download files if the md5 values have changes. Not
wanting to do so is the corner case. This allows us to remove a lot of
parameters from test and example scripts, included in this patch.

Change-Id: I99fc7743f5adf78bf6f4f8efc6222e6df83ac6da
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52086
Reviewed-by: Bobby R. Bruce 
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
---
M tests/gem5/x86-boot-tests/test_linux_boot.py
M tests/gem5/riscv-boot-tests/test_linux_boot.py
M configs/example/gem5_library/arm-hello.py
M src/python/gem5/resources/downloader.py
M tests/gem5/configs/boot_kvm_fork_run.py
M tests/gem5/configs/parsec_disk_run.py
M src/python/gem5/resources/resource.py
M tests/gem5/configs/boot_kvm_switch_exit.py
M tests/gem5/hello_se/test_hello_se.py
M tests/gem5/stats/test_hdf5.py
M configs/example/gem5_library/x86-ubuntu-run.py
M tests/gem5/parsec-benchmarks/test_parsec.py
M tests/gem5/kvm-fork-tests/test_kvm_fork_run.py
M tests/gem5/configs/riscv_boot_exit_run.py
M tests/gem5/configs/simple_binary_run.py
M tests/gem5/m5_util/test_exit.py
M tests/gem5/configs/x86_boot_exit_run.py
M tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py
18 files changed, 46 insertions(+), 94 deletions(-)

Approvals:
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/configs/example/gem5_library/arm-hello.py  
b/configs/example/gem5_library/arm-hello.py

index 7dbc8a2..067c867 100644
--- a/configs/example/gem5_library/arm-hello.py
+++ b/configs/example/gem5_library/arm-hello.py
@@ -84,20 +84,13 @@
 # download the binary from the gem5 Resources cloud bucket if it's not  
already

 # present.
 board.set_workload(
-Resource(
-# The `Resource` class reads the `resources.json` file from the  
gem5

-# resources repository:
-# https://gem5.googlesource.com/public/gem5-resource.
-# Any resource specified in this file will be automatically  
retrieved.
-# At the time of writing, this file is a WIP and does not contain  
all
-# resources. Jira ticket:  
https://gem5.atlassian.net/browse/GEM5-1096

-"arm-hello64-static",
-# `override=True` means the if the binary already exists locally  
within
-# the resource directory, and the hash's differ to that in the  
cloud
-# bucket, the local copy will be overwritten. If this were set to  
false

-# an exception would be thrown in this case.
-override=True,
-)
+# The `Resource` class reads the `resources.json` file from the gem5
+# resources repository:
+# https://gem5.googlesource.com/public/gem5-resource.
+# Any resource specified in this file will be automatically retrieved.
+# At the time of writing, this file is a WIP and does not contain all
+# resources. Jira ticket: https://gem5.atlassian.net/browse/GEM5-1096
+Resource("arm-hello64-static")
 )

 # Lastly we setup the root, instantiate the design, and run the simulation.
diff --git a/configs/example/gem5_library/x86-ubuntu-run.py  
b/configs/example/gem5_library/x86-ubuntu-run.py

index de7cc0a..ce3d637 100644
--- a/configs/example/gem5_library/x86-ubuntu-run.py
+++ b/configs/example/gem5_library/x86-ubuntu-run.py
@@ -122,16 +122,10 @@
 board.set_kernel_disk_workload(
 # The x86 linux kernel will be automatically downloaded to the if not
 # already present.
-kernel=Resource(
-"x86-linux-kernel-5.4.49",
-override=True,
-),
+kernel=Resource("x86-linux-kernel-5.4.49"),
 # The x86 ubuntu image will be automatically downloaded to the if not
 # already present.
-disk_image=Resource(
-"x86-ubuntu-img",
-override=True,
-),
+disk_image=Resource("x86-ubuntu-img"),
 readfile_contents=command,
 )

diff --git a/src/python/gem5/resources/downloader.py  
b/src/python/gem5/resources/downloader.py

index fab7864..86ddefb 100644
--- a/src/python/gem5/resources/downloader.py
+++ b/src/python/gem5/resources/downloader.py
@@ -198,7 +198,7 @@
 resource_name: str,
 to_path: str,
 unzip: bool = True,
-override: bool = False,
+download_md5_mismatch: bool = True,
 ) -> None:
 """
 Obtains a gem5 resource and stored it to a specified location. If the
@@ -212,10 +212,10 @@
 :param unzip: If true, gzipped resources will be unzipped prior to  
saving

 to `to_path`. True by default.

-:param override: 

[gem5-dev] Change in gem5/gem5[develop]: stdlib: Move 'connect_things' to AbstractBoard constructor

2021-11-08 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52184 )


Change subject: stdlib: Move 'connect_things' to AbstractBoard constructor
..

stdlib: Move 'connect_things' to AbstractBoard constructor

This patch moves 'connect_things' to the AbstractBoard constructor,
thereby meaning it does not need to be called directly in gem5
configuration scripts. This method has been changed to private as a
result.

As boards that inherit from AbstractBoard require certain things to be
setup prior to `connect_things` being called, a new abstract function,
`_setup_board` has been created. This is called in the AbstractBoard
constructor before `connect_things` and can be overridden by boards to
setup board properties as required.

Change-Id: I558a4321b850a6b19e20b7d56d0bcae5805114b6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52184
Reviewed-by: Bobby R. Bruce 
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
---
M configs/example/gem5_library/riscv-fs.py
M src/python/gem5/components/boards/simple_board.py
M src/python/gem5/components/boards/riscv_board.py
M configs/example/gem5_library/arm-hello.py
M tests/gem5/configs/boot_kvm_fork_run.py
M tests/gem5/configs/parsec_disk_run.py
M src/python/gem5/components/boards/test_board.py
M tests/gem5/configs/boot_kvm_switch_exit.py
M configs/example/gem5_library/x86-ubuntu-run.py
M src/python/gem5/components/boards/x86_board.py
M tests/gem5/configs/riscv_boot_exit_run.py
M tests/gem5/configs/simple_binary_run.py
M tests/gem5/configs/simple_traffic_run.py
M tests/gem5/configs/x86_boot_exit_run.py
M src/python/gem5/components/boards/abstract_board.py
15 files changed, 49 insertions(+), 26 deletions(-)

Approvals:
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/configs/example/gem5_library/arm-hello.py  
b/configs/example/gem5_library/arm-hello.py

index 067c867..dc4266c 100644
--- a/configs/example/gem5_library/arm-hello.py
+++ b/configs/example/gem5_library/arm-hello.py
@@ -75,10 +75,6 @@
 cache_hierarchy=cache_hierarchy,
 )

-# This method must be called to connect all the components specified during
-# the board's construction.
-board.connect_things()
-
 # Here we set the workload. In this case we want to run a simple "Hello  
World!"

 # program compiled to the ARM ISA. The `Resource` class will automatically
 # download the binary from the gem5 Resources cloud bucket if it's not  
already
diff --git a/configs/example/gem5_library/riscv-fs.py  
b/configs/example/gem5_library/riscv-fs.py

index 35a7250..f46a345 100644
--- a/configs/example/gem5_library/riscv-fs.py
+++ b/configs/example/gem5_library/riscv-fs.py
@@ -78,8 +78,6 @@
 cache_hierarchy=cache_hierarchy,
 )

-board.connect_things()
-
 # Set the Full System workload.
 board.set_kernel_disk_workload(
kernel=Resource("riscv-bootloader-vmlinux-5.10"),
diff --git a/configs/example/gem5_library/x86-ubuntu-run.py  
b/configs/example/gem5_library/x86-ubuntu-run.py

index ce3d637..1ab9f3a 100644
--- a/configs/example/gem5_library/x86-ubuntu-run.py
+++ b/configs/example/gem5_library/x86-ubuntu-run.py
@@ -102,8 +102,6 @@
 cache_hierarchy=cache_hierarchy,
 )

-board.connect_things()
-
 # Here we set the Full System workload.
 # The `set_kernel_disk_workload` function for the X86Board takes a kernel,  
a

 # disk image, and, optionally, a command to run.
diff --git a/src/python/gem5/components/boards/abstract_board.py  
b/src/python/gem5/components/boards/abstract_board.py

index 60ce0de..ce86ab4 100644
--- a/src/python/gem5/components/boards/abstract_board.py
+++ b/src/python/gem5/components/boards/abstract_board.py
@@ -92,7 +92,12 @@
 self.memory = memory
 self.cache_hierarchy = cache_hierarchy

-self.setup_memory_ranges()
+
+# Setup board properties unique to the board being constructed.
+self._setup_board()
+
+# Connect the memory, processor, and cache hierarchy.
+self._connect_things()

 def get_processor(self) -> "AbstractProcessor":
 """Get the processor connected to the board.
@@ -135,11 +140,20 @@

 def get_clock_domain(self) -> ClockDomain:
 """Get the clock domain.
-
 :returns: The clock domain.
 """
 return self.clk_domain

+@abstractmethod
+def _setup_board(self) -> None:
+"""
+This function is called in the AbstractBoard constructor, before  
the
+memory, processor, and cache hierarchy components are incorporated  
via

+`_connect_thing()`. This function should be overridden by boards to
+specify components, connections unique to that board.
+"""
+raise NotImplementedError
+
 # Technically `get_dma_ports` returns a list. This list could be empty  
to

 # indicate the presense of dma ports. Though I quite like 

[gem5-dev] Change in gem5/gem5[develop]: stdlib: Move 'connect_things' to the AbstractBoard

2021-11-08 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52183 )


 (

12 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the  
submitted one.

 )Change subject: stdlib: Move 'connect_things' to the AbstractBoard
..

stdlib: Move 'connect_things' to the AbstractBoard

This is in order to enforce a strict ordering of how gem5 components are
incorporated into a board. The `connect_things` function is now final so
it cannot be overridden.

Change-Id: I4c0e7ac9d307b399854f5326bb57bcf561f92054
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52183
Tested-by: kokoro 
Reviewed-by: Bobby R. Bruce 
Maintainer: Bobby R. Bruce 
---
M src/python/gem5/components/boards/simple_board.py
M src/python/gem5/components/boards/riscv_board.py
M src/python/gem5/components/boards/test_board.py
M src/python/gem5/components/boards/x86_board.py
M src/python/gem5/components/boards/abstract_board.py
5 files changed, 46 insertions(+), 54 deletions(-)

Approvals:
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/python/gem5/components/boards/abstract_board.py  
b/src/python/gem5/components/boards/abstract_board.py

index 845ccb2..60ce0de 100644
--- a/src/python/gem5/components/boards/abstract_board.py
+++ b/src/python/gem5/components/boards/abstract_board.py
@@ -37,7 +37,7 @@
 VoltageDomain,
 )

-from typing import List
+from typing import List, final


 class AbstractBoard(System):
@@ -219,15 +219,24 @@
 """
 raise NotImplementedError

-@abstractmethod
+@final
 def connect_things(self) -> None:
 """Connects all the components to the board.

-This should be called after the constructor.
+The order of this board is always:

-When implementing this function, derived boards should use this to
-hook up the memory, process, and cache hierarchy as a *second*  
stage.
-You should use this function to connect things together when you  
need

-to know that everything has already been constructed.
+1. Connect the memory.
+2. Connect the processor.
+3. Connect the cache hierarchy.
+
+Developers may build upon this assumption when creating components.
 """
-raise NotImplementedError
+
+# Incorporate the memory into the motherboard.
+self.get_memory().incorporate_memory(self)
+
+# Incorporate the processor into the motherboard.
+self.get_processor().incorporate_processor(self)
+
+# Incorporate the cache hierarchy for the motherboard.
+self.get_cache_hierarchy().incorporate_cache(self)
diff --git a/src/python/gem5/components/boards/riscv_board.py  
b/src/python/gem5/components/boards/riscv_board.py

index 18c742e..2b3261d 100644
--- a/src/python/gem5/components/boards/riscv_board.py
+++ b/src/python/gem5/components/boards/riscv_board.py
@@ -123,6 +123,9 @@
 self._on_chip_devices = [self.platform.clint, self.platform.plic]
 self._off_chip_devices = [self.platform.uart, self.disk]

+# Set up the memory ranges
+self.setup_memory_ranges()
+
 def _setup_io_devices(self) -> None:
 """Connect the I/O devices to the I/O bus"""

@@ -192,20 +195,6 @@
 self.mem_ranges = [AddrRange(start=0x8000, size=mem_size)]
 memory.set_memory_range(self.mem_ranges)

-@overrides(AbstractBoard)
-def connect_things(self) -> None:
-# Before incorporating the memory, set up the memory ranges
-self.setup_memory_ranges()
-
-# Incorporate the cache hierarchy for the motherboard.
-self.get_cache_hierarchy().incorporate_cache(self)
-
-# Incorporate the processor into the motherboard.
-self.get_processor().incorporate_processor(self)
-
-# Incorporate the memory into the motherboard.
-self.get_memory().incorporate_memory(self)
-
 def generate_device_tree(self, outdir: str) -> None:
 """Creates the dtb and dts files.

diff --git a/src/python/gem5/components/boards/simple_board.py  
b/src/python/gem5/components/boards/simple_board.py

index efe1736..3645ed8 100644
--- a/src/python/gem5/components/boards/simple_board.py
+++ b/src/python/gem5/components/boards/simple_board.py
@@ -72,16 +72,8 @@
 exit_on_work_items=exit_on_work_items,
 )

-@overrides(AbstractBoard)
-def connect_things(self) -> None:
-# Incorporate the cache hierarchy for the motherboard.
-self.get_cache_hierarchy().incorporate_cache(self)
-
-# Incorporate the processor into the motherboard.
-self.get_processor().incorporate_processor(self)
-
-# Incorporate the memory into the motherboard.
-self.get_memory().incorporate_memory(self)
+# Set up the memory ranges
+

[gem5-dev] Change in gem5/gem5[develop]: stdlib: Automatically set disk root partition in set_workload

2021-11-08 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/51948 )


Change subject: stdlib: Automatically set disk root partition in  
set_workload

..

stdlib: Automatically set disk root partition in set_workload

The linux kernel `root` parameter must be specified in the board's
`set_workload` function. However, the root partition on a disk image
passed to this function can change. Therefore, for gem5 resources disk
images, we inspect the metadata to obtain the root partition and
automatically set this.

This patch is dependent on the following gem5 resources change to
function correctly:
https://gem5-review.googlesource.com/c/public/gem5-resources/+/51887

Note: This patch will only automatically set the root partition
information for disk images in gem5 resources.

Issue-on: https://gem5.atlassian.net/browse/GEM5-1102
Change-Id: I9a19706f3ba78bf026b6bfdff4bff84a3c8ccdb2
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51948
Reviewed-by: Bobby R. Bruce 
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
---
M src/python/gem5/components/boards/riscv_board.py
M src/python/gem5/resources/resource.py
M src/python/gem5/components/boards/x86_board.py
3 files changed, 75 insertions(+), 9 deletions(-)

Approvals:
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/python/gem5/components/boards/riscv_board.py  
b/src/python/gem5/components/boards/riscv_board.py

index 43a5112..3fc15cb 100644
--- a/src/python/gem5/components/boards/riscv_board.py
+++ b/src/python/gem5/components/boards/riscv_board.py
@@ -240,7 +240,19 @@
 image.child.image_file = disk_image.get_local_path()
 self.disk.vio.image = image

-self.workload.command_line = "console=ttyS0 root=/dev/vda ro"
+# Determine where the root exists in the disk image. This is done  
by

+# inspecting the resource metadata.
+root_val = "/dev/vda"
+try:
+partition_val =  
disk_image.get_metadata()["additional_metadata"]\

+ ["root_partition"]
+except KeyError:
+partition_val = None
+
+if partition_val is not None:
+root_val += partition_val
+
+self.workload.command_line = f"console=ttyS0 root={root_val} ro"

 # Note: This must be called after set_workload because it looks  
for an

 # attribute named "disk" and connects
diff --git a/src/python/gem5/components/boards/x86_board.py  
b/src/python/gem5/components/boards/x86_board.py

index c6ce459..a32ee7d 100644
--- a/src/python/gem5/components/boards/x86_board.py
+++ b/src/python/gem5/components/boards/x86_board.py
@@ -288,20 +288,34 @@
 first partition should be the root partition.
 :param command: The command(s) to run with bash once the OS is  
booted
 :param kernel_args: Additional arguments to be passed to the  
kernel.

-`earlyprintk=ttyS0 console=ttyS0 lpj=723 root=/dev/hda1` are
-already passed. This parameter is used to pass additional  
arguments.

+`earlyprintk=ttyS0 console=ttyS0 lpj=723
+root=/dev/hda` are already passed  
(`` is
+automatically inferred from resource metadata). This parameter is  
used

+to pass additional arguments.
 """

 # Set the Linux kernel to use.
 self.workload.object_file = kernel.get_local_path()

+# Determine where the root exists in the disk image. This is done  
by

+# inspecting the resource metadata.
+root_val = "/dev/hda"
+try:
+partition_val =  
disk_image.get_metadata()["additional_metadata"]\

+ ["root_partition"]
+except KeyError:
+partition_val = None
+
+if partition_val is not None:
+root_val += partition_val
+
 # Options specified on the kernel command line.
 self.workload.command_line = " ".join(
 [
 "earlyprintk=ttyS0",
 "console=ttyS0",
 "lpj=723",
-"root=/dev/hda1",
+f"root={root_val}",
 ] + kernel_args
 )

diff --git a/src/python/gem5/resources/resource.py  
b/src/python/gem5/resources/resource.py

index 07c6a80..b054b09 100644
--- a/src/python/gem5/resources/resource.py
+++ b/src/python/gem5/resources/resource.py
@@ -28,9 +28,9 @@
 import os
 from pathlib import Path

-from .downloader import get_resource
+from .downloader import get_resource, get_resources_json_obj

-from typing import Optional
+from typing import Optional, Dict

 """
 A Resource object encapsulates a gem5 resource. Resources are items needed  
to

@@ -50,12 +50,21 @@

 __metaclass__ = ABCMeta

-def __init__(self, local_path: str):
+def 

[gem5-dev] Change in gem5/gem5[develop]: stdlib: Create 'KernelDiskWorkload' abstract class

2021-11-08 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/51949 )


Change subject: stdlib: Create 'KernelDiskWorkload' abstract class
..

stdlib: Create 'KernelDiskWorkload' abstract class

The purpose of this class is to:

* Create a standard way to set a typical kernel/disk image workload.
* Cleans up the manner in which readfile values/contents are set.
* Allows a user to specify their own kernel arguments, but still sets
sensible defaults.

As of this commit, this interface has been added to the X86Board and the
RISCVBoard.

Change-Id: I34f4c2b829f1ae5c1cae12039436cbb345a89d09
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51949
Reviewed-by: Bobby R. Bruce 
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
---
M configs/example/gem5_library/riscv-fs.py
M src/python/gem5/components/boards/riscv_board.py
M tests/gem5/configs/boot_kvm_fork_run.py
M tests/gem5/configs/parsec_disk_run.py
M tests/gem5/configs/boot_kvm_switch_exit.py
M src/python/SConscript
M configs/example/gem5_library/x86-ubuntu-run.py
M src/python/gem5/components/boards/x86_board.py
M tests/gem5/configs/riscv_boot_exit_run.py
A src/python/gem5/components/boards/kernel_disk_workload.py
M tests/gem5/configs/x86_boot_exit_run.py
11 files changed, 290 insertions(+), 173 deletions(-)

Approvals:
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/configs/example/gem5_library/riscv-fs.py  
b/configs/example/gem5_library/riscv-fs.py

index 762743c..35a7250 100644
--- a/configs/example/gem5_library/riscv-fs.py
+++ b/configs/example/gem5_library/riscv-fs.py
@@ -81,8 +81,10 @@
 board.connect_things()

 # Set the Full System workload.
-board.set_workload(disk_image=Resource("riscv-disk-img"),
-   bootloader=Resource("riscv-bootloader-vmlinux-5.10"))
+board.set_kernel_disk_workload(
+   kernel=Resource("riscv-bootloader-vmlinux-5.10"),
+   disk_image=Resource("riscv-disk-img"),
+)

 root = Root(full_system=True, system=board)

diff --git a/configs/example/gem5_library/x86-ubuntu-run.py  
b/configs/example/gem5_library/x86-ubuntu-run.py

index 17cabcb..860707a 100644
--- a/configs/example/gem5_library/x86-ubuntu-run.py
+++ b/configs/example/gem5_library/x86-ubuntu-run.py
@@ -107,8 +107,8 @@
 board.connect_things()

 # Here we set the Full System workload.
-# The `set_workload` function for the X86Board takes a kernel, a disk  
image,

-# and, optionally, a command to run.
+# The `set_kernel_disk_workload` function for the X86Board takes a kernel,  
a

+# disk image, and, optionally, a command to run.

 # This is the command to run after the system has booted. The first `m5  
exit`
 # will stop the simulation so we can switch the CPU cores from KVM to  
timing

@@ -121,7 +121,7 @@
 + "sleep 1;" \
 + "m5 exit;"

-board.set_workload(
+board.set_kernel_disk_workload(
 # The x86 linux kernel will be automatically downloaded to the
 # `tests/gem5/resources` directory if not already present.
 kernel=Resource(
@@ -158,9 +158,10 @@
 ),
 override=True,
 ),
-command=command,
+readfile_contents=command,
 )

+
 root = Root(full_system=True, system=board)
 root.sim_quantum = int(1e9)  # sim_quantum must be st if KVM cores are  
used.


diff --git a/src/python/SConscript b/src/python/SConscript
index e750829..db564ef 100644
--- a/src/python/SConscript
+++ b/src/python/SConscript
@@ -40,6 +40,8 @@
  
PySource('gem5.components.boards', 'gem5/components/boards/simple_board.py')

 PySource('gem5.components.boards', 'gem5/components/boards/test_board.py')
 PySource('gem5.components.boards', 'gem5/components/boards/x86_board.py')
+PySource('gem5.components.boards',
+"gem5/components/boards/kernel_disk_workload.py")
 PySource('gem5.components.cachehierarchies',
 'gem5/components/cachehierarchies/__init__.py')
 PySource('gem5.components.cachehierarchies',
diff --git a/src/python/gem5/components/boards/kernel_disk_workload.py  
b/src/python/gem5/components/boards/kernel_disk_workload.py

new file mode 100644
index 000..424d839
--- /dev/null
+++ b/src/python/gem5/components/boards/kernel_disk_workload.py
@@ -0,0 +1,178 @@
+# Copyright (c) 2021 The Regents of the University of California
+# 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
+# 

[gem5-dev] Change in gem5/gem5[develop]: stdlib,configs: Remove setting resource_directory in examples

2021-11-08 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/51950 )


 (

12 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the  
submitted one.
 )Change subject: stdlib,configs: Remove setting resource_directory in  
examples

..

stdlib,configs: Remove setting resource_directory in examples

As part of https://gem5-review.googlesource.com/c/public/gem5/+/51369
we have a default resource directory. We therefore no longer need to set
`resource_directory` to get a consistent download location.

Change-Id: I0bef9930db9157a999dc063bd49377de1fe75102
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51950
Tested-by: kokoro 
Reviewed-by: Bobby R. Bruce 
Maintainer: Bobby R. Bruce 
---
M configs/example/gem5_library/arm-hello.py
M configs/example/gem5_library/x86-ubuntu-run.py
2 files changed, 21 insertions(+), 46 deletions(-)

Approvals:
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/configs/example/gem5_library/arm-hello.py  
b/configs/example/gem5_library/arm-hello.py

index 9641d2b..7dbc8a2 100644
--- a/configs/example/gem5_library/arm-hello.py
+++ b/configs/example/gem5_library/arm-hello.py
@@ -53,8 +53,6 @@
 from gem5.components.processors.simple_processor import SimpleProcessor
 from gem5.components.processors.cpu_types import CPUTypes

-import os
-
 # This check ensures the gem5 binary is compiled to the ARM ISA target. If  
not,

 # an exception will be thrown.
 requires(isa_required=ISA.ARM)
@@ -99,20 +97,6 @@
 # bucket, the local copy will be overwritten. If this were set to  
false

 # an exception would be thrown in this case.
 override=True,
-# We hardcode the resource directory to `tests/gem5/resources`. The
-# `arm-hello64-static` binary will be downloaded and stored there.
-resource_directory=os.path.join(
-os.path.dirname(
-os.path.dirname(
-os.path.dirname(
-os.path.dirname(os.path.realpath(__file__))
-)
-)
-),
-"tests",
-"gem5",
-"resources",
-),
 )
 )

diff --git a/configs/example/gem5_library/x86-ubuntu-run.py  
b/configs/example/gem5_library/x86-ubuntu-run.py

index 860707a..de7cc0a 100644
--- a/configs/example/gem5_library/x86-ubuntu-run.py
+++ b/configs/example/gem5_library/x86-ubuntu-run.py
@@ -55,8 +55,6 @@
 from gem5.coherence_protocol import CoherenceProtocol
 from gem5.resources.resource import Resource

-import os
-
 # This runs a check to ensure the gem5 binary is compiled to X86 and to the
 # MESI Two Level coherence protocol.
 requires(
@@ -122,40 +120,16 @@
 + "m5 exit;"

 board.set_kernel_disk_workload(
-# The x86 linux kernel will be automatically downloaded to the
-# `tests/gem5/resources` directory if not already present.
+# The x86 linux kernel will be automatically downloaded to the if not
+# already present.
 kernel=Resource(
 "x86-linux-kernel-5.4.49",
-resource_directory=os.path.join(
-os.path.dirname(
-os.path.dirname(
-os.path.dirname(
-os.path.dirname(os.path.realpath(__file__))
-)
-)
-),
-"tests",
-"gem5",
-"resources",
-),
 override=True,
 ),
-# The x86 ubuntu image will be automatically downloaded to the
-# `tests/gem5/resources` directory if not already present.
+# The x86 ubuntu image will be automatically downloaded to the if not
+# already present.
 disk_image=Resource(
 "x86-ubuntu-img",
-resource_directory=os.path.join(
-os.path.dirname(
-os.path.dirname(
-os.path.dirname(
-os.path.dirname(os.path.realpath(__file__))
-)
-)
-),
-"tests",
-"gem5",
-"resources",
-),
 override=True,
 ),
 readfile_contents=command,

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/51950
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: I0bef9930db9157a999dc063bd49377de1fe75102
Gerrit-Change-Number: 51950
Gerrit-PatchSet: 14
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
Gerrit-MessageType: merged
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an 

[gem5-dev] Change in gem5/gem5[develop]: stdlib: Add missing @overrides to RISCVBoard

2021-11-08 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52185 )


Change subject: stdlib: Add missing @overrides to RISCVBoard
..

stdlib: Add missing @overrides to RISCVBoard

Change-Id: I6879c9744c28038c5d40984785f2f502a2fd1c5a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52185
Reviewed-by: Bobby R. Bruce 
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
---
M src/python/gem5/components/boards/riscv_board.py
1 file changed, 15 insertions(+), 0 deletions(-)

Approvals:
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/python/gem5/components/boards/riscv_board.py  
b/src/python/gem5/components/boards/riscv_board.py

index 99bb630..ac8440d 100644
--- a/src/python/gem5/components/boards/riscv_board.py
+++ b/src/python/gem5/components/boards/riscv_board.py
@@ -183,9 +183,11 @@
 def get_io_bus(self) -> IOXBar:
 return self.iobus

+@overrides(AbstractBoard)
 def has_coherent_io(self) -> bool:
 return True

+@overrides(AbstractBoard)
 def get_mem_side_coherent_io_port(self) -> Port:
 return self.iobus.mem_side_ports


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/52185
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: I6879c9744c28038c5d40984785f2f502a2fd1c5a
Gerrit-Change-Number: 52185
Gerrit-PatchSet: 12
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: stdlib: Remove SimpleBoard as a superclass

2021-11-08 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/51790 )


Change subject: stdlib: Remove SimpleBoard as a superclass
..

stdlib: Remove SimpleBoard as a superclass

Previously SimpleBoard inherited from AbstractBoard and X86Board and
RiscvBoard inherited from the SimpleBoard. This has been shown to be a
needless level of abstraction. As such, this commit refactors the code
to have X86Board and RiscvBoard inherit directly from AbstractBoard.
Code common to the SimpleBoard, X86Board, and RiscvBoard has been moved
to the AbstractBoard.

Change-Id: I5a2c7404efeb4f8ddcb5d8006e3c163d10b88b2c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51790
Reviewed-by: Bobby R. Bruce 
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
---
M src/python/gem5/components/boards/simple_board.py
M src/python/gem5/components/boards/riscv_board.py
M src/python/gem5/components/boards/test_board.py
M src/python/gem5/components/boards/x86_board.py
M src/python/gem5/components/boards/abstract_board.py
5 files changed, 96 insertions(+), 63 deletions(-)

Approvals:
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/python/gem5/components/boards/abstract_board.py  
b/src/python/gem5/components/boards/abstract_board.py

index 165b0d9..845ccb2 100644
--- a/src/python/gem5/components/boards/abstract_board.py
+++ b/src/python/gem5/components/boards/abstract_board.py
@@ -26,9 +26,16 @@

 from abc import ABCMeta, abstractmethod

-from .mem_mode import MemMode
+from .mem_mode import MemMode, mem_mode_to_string

-from m5.objects import System, Port, IOXBar, ClockDomain
+from m5.objects import (
+System,
+Port,
+IOXBar,
+ClockDomain,
+SrcClockDomain,
+VoltageDomain,
+)

 from typing import List

@@ -56,17 +63,31 @@

 def __init__(
 self,
+clk_freq: str,
 processor: "AbstractProcessor",
 memory: "AbstractMemory",
 cache_hierarchy: "AbstractCacheHierarchy",
+exit_on_work_items: bool = False,
 ) -> None:
 super(AbstractBoard, self).__init__()
 """
+:param clk_freq: The clock frequency for this board.
 :param processor: The processor for this board.
 :param memory: The memory for this board.
 :param cache_hierarchy: The Cachie Hierarchy for this board.
+:param exit_on_work_items: Whether the simulation should exit
+on work items.
 """

+# Set up the clock domain and the voltage domain.
+self.clk_domain = SrcClockDomain()
+self.clk_domain.clock = clk_freq
+self.clk_domain.voltage_domain = VoltageDomain()
+
+# Set whether to exit on work items.
+self.exit_on_work_items = exit_on_work_items
+
+# Set the processor, memory, and cache hierarchy.
 self.processor = processor
 self.memory = memory
 self.cache_hierarchy = cache_hierarchy
@@ -101,6 +122,24 @@
 """
 return self.cache_line_size

+def connect_system_port(self, port: Port) -> None:
+self.system_port = port
+
+def set_mem_mode(self, mem_mode: MemMode) -> None:
+"""
+Set the memory mode of the board.
+
+:param mem_mode: The memory mode the board is to be set to.
+"""
+self.mem_mode = mem_mode_to_string(mem_mode=mem_mode)
+
+def get_clock_domain(self) -> ClockDomain:
+"""Get the clock domain.
+
+:returns: The clock domain.
+"""
+return self.clk_domain
+
 # Technically `get_dma_ports` returns a list. This list could be empty  
to

 # indicate the presense of dma ports. Though I quite like having this
 # boolean to quickly check a board.
@@ -165,27 +204,6 @@
 raise NotImplementedError

 @abstractmethod
-def get_clock_domain(self) -> ClockDomain:
-"""Get the clock domain.
-
-:returns: The clock domain.
-"""
-raise NotImplementedError
-
-@abstractmethod
-def connect_system_port(self, port: Port) -> None:
-raise NotImplementedError
-
-@abstractmethod
-def set_mem_mode(self, mem_mode: MemMode) -> None:
-"""
-Set the memory mode of the board.
-
-:param mem_mode: The memory mode the board is to be set to.
-"""
-raise NotImplementedError
-
-@abstractmethod
 def setup_memory_ranges(self) -> None:
 """
 Set the memory ranges for this board.
diff --git a/src/python/gem5/components/boards/riscv_board.py  
b/src/python/gem5/components/boards/riscv_board.py

index d42cfd5..43a5112 100644
--- a/src/python/gem5/components/boards/riscv_board.py
+++ b/src/python/gem5/components/boards/riscv_board.py
@@ -25,10 +25,9 @@
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 import os
-from typing import Optional
+from typing 

[gem5-dev] Change in gem5/gem5[develop]: tests: Update RISCV boot tests to use Ubuntu resource

2021-11-08 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52089 )


 (

2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the  
submitted one.

 )Change subject: tests: Update RISCV boot tests to use Ubuntu resource
..

tests: Update RISCV boot tests to use Ubuntu resource

This ubuntu disk image will execute an 'm5 exit' after boot and can
therefore be used to execute "boot exit" tests as part of our
long/nightly tests. These are included in this patch.

Change-Id: Ia5bdb1bfc3d9100b2ea15e23bddb49f7c4faf32d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52089
Tested-by: kokoro 
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
---
M tests/gem5/riscv-boot-tests/test_linux_boot.py
M tests/gem5/configs/riscv_boot_exit_run.py
2 files changed, 83 insertions(+), 22 deletions(-)

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




diff --git a/tests/gem5/configs/riscv_boot_exit_run.py  
b/tests/gem5/configs/riscv_boot_exit_run.py

index 93069f8..629a0d0 100644
--- a/tests/gem5/configs/riscv_boot_exit_run.py
+++ b/tests/gem5/configs/riscv_boot_exit_run.py
@@ -80,7 +80,7 @@
 "-t",
 "--tick-exit",
 type=int,
-required=True,
+required=False,
 help="The tick to exit the simulation.",
 )

@@ -152,7 +152,7 @@
 resource_directory=args.resource_directory,
 ),
 disk_image=Resource(
-"riscv-disk-img",
+"riscv-ubuntu-20.04-img",
 resource_directory=args.resource_directory,
 ),
 )
diff --git a/tests/gem5/riscv-boot-tests/test_linux_boot.py  
b/tests/gem5/riscv-boot-tests/test_linux_boot.py

index 8cced2d..7c70d1d 100644
--- a/tests/gem5/riscv-boot-tests/test_linux_boot.py
+++ b/tests/gem5/riscv-boot-tests/test_linux_boot.py
@@ -26,6 +26,8 @@

 import re

+from typing import Optional
+
 from testlib import *

 if config.bin_path:
@@ -38,10 +40,11 @@
 cpu: str,
 num_cpus: int,
 cache_type: str,
-to_tick: int,
 length: str,
+to_tick: Optional[int] = None,
 ):
-name = "{}-cpu_{}-{}-cores_riscv-boot-test_to-tick".format(
+
+name = "{}-cpu_{}-{}-cores_riscv-boot-test".format(
 cpu, str(num_cpus), cache_type)

 verifiers = []
@@ -52,6 +55,21 @@
 )
 verifiers.append(verifier.MatchRegex(exit_regex))

+config_args=[
+"--cpu",
+cpu,
+"--num-cpus",
+str(num_cpus),
+"--mem-system",
+cache_type,
+"--resource-directory",
+resource_path,
+]
+
+if to_tick:
+name += "_to-tick"
+config_args += ["--tick-exit", str(to_tick)]
+
 gem5_verify_config(
 name=name,
 verifiers=verifiers,
@@ -63,18 +81,7 @@
 "configs",
 "riscv_boot_exit_run.py",
 ),
-config_args=[
-"--cpu",
-cpu,
-"--num-cpus",
-str(num_cpus),
-"--mem-system",
-cache_type,
-"--tick-exit",
-str(to_tick),
-"--resource-directory",
-resource_path,
-],
+config_args=config_args,
 valid_isas=(constants.riscv_tag,),
 valid_hosts=constants.supported_hosts,
 length=length,
@@ -87,46 +94,83 @@
 cpu="atomic",
 num_cpus=1,
 cache_type="classic",
-to_tick=100,  # Simulates 1/100th of a second.
 length=constants.quick_tag,
+to_tick=100,  # Simulates 1/100th of a second.
 )

 test_boot(
 cpu="timing",
 num_cpus=1,
 cache_type="classic",
-to_tick=100,
 length=constants.quick_tag,
+to_tick=100,
 )

 test_boot(
 cpu="timing",
 num_cpus=1,
 cache_type="mi_example",
-to_tick=100,
 length=constants.quick_tag,
+to_tick=100,
 )

 test_boot(
 cpu="o3",
 num_cpus=1,
 cache_type="classic",
-to_tick=100,
 length=constants.quick_tag,
+to_tick=100,
 )

 test_boot(
 cpu="timing",
 num_cpus=4,
 cache_type="classic",
-to_tick=100,
 length=constants.quick_tag,
+to_tick=100,
 )

 test_boot(
 cpu="timing",
 num_cpus=4,
 cache_type="mi_example",
-to_tick=100,
 length=constants.quick_tag,
+to_tick=100,
+)
+
+ The long (Nightly) tests 
+
+test_boot(
+cpu="atomic",
+num_cpus=1,
+cache_type="classic",
+length=constants.long_tag,
+)
+
+test_boot(
+cpu="timing",
+num_cpus=1,
+cache_type="mi_example",
+length=constants.long_tag,
+)
+
+test_boot(
+cpu="timing",
+num_cpus=4,
+cache_type="mi_example",
+length=constants.long_tag,
+)
+
+test_boot(
+cpu="atomic",
+num_cpus=4,
+cache_type="classic",
+length=constants.long_tag,
+)
+
+test_boot(
+cpu="o3",

[gem5-dev] Change in gem5/gem5[develop]: stdlib: Fix resource downloader download to cwd upon failure

2021-11-08 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52423 )


Change subject: stdlib: Fix resource downloader download to cwd upon failure
..

stdlib: Fix resource downloader download to cwd upon failure

There are some cases where default downloading to `~/.cache/gem5` will
not work (for example, running gem5 in a Docker container, an error
observed here:
https://gem5-review.googlesource.com/c/public/gem5/+/51950).

To fix this, the `_get_default_resource_dir` has been altered to iterate
through a list of default resource directory targets. This change will
mean if `~/.cache/gem5` is not available then the resource is downloaded
to the current working directory of gem5.

Change-Id: I84e523f3adc182e140959243ff9335510d6b7185
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52423
Reviewed-by: Bobby R. Bruce 
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
---
M src/python/gem5/resources/resource.py
1 file changed, 46 insertions(+), 3 deletions(-)

Approvals:
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/python/gem5/resources/resource.py  
b/src/python/gem5/resources/resource.py

index b054b09..1abc9b4 100644
--- a/src/python/gem5/resources/resource.py
+++ b/src/python/gem5/resources/resource.py
@@ -102,7 +102,7 @@
 :param resource_directory: The location of the directory in which  
the
 resource is to be stored. If this parameter is not set, it will  
set to
 the environment variable `GEM5_RESOURCE_DIR`. If the environment  
is not

-set it will default to `~/.cache/gem5`.
+set it will default to `~/.cache/gem5` if available, otherwise the  
CWD.

 :param override: If the resource is present, but does not have the
 correct md5 value, the resoruce will be deleted and re-downloaded  
if

 this value is True. Otherwise an exception will be thrown. False by
@@ -137,8 +137,28 @@

 def _get_default_resource_dir(cls) -> str:
 """
-Obtain the default gem5 resources directory on the host system.
+Obtain the default gem5 resources directory on the host system.  
This
+function will iterate through sensible targets until it finds one  
that

+works on the host system.

 :returns: The default gem5 resources directory.
 """
-return os.path.join(Path.home(), ".cache", "gem5")
+test_list = [
+# First try `~/.cache/gem5`.
+os.path.join(Path.home(), ".cache", "gem5"),
+# Last resort, just put things in the cwd.
+os.path.join(Path.cwd(), "resources"),
+]
+
+for path in test_list:
+if os.path.exists(path): # If the path already exists...
+if os.path.isdir(path): # Check to see the path is a  
directory.

+return path # If so, the path is valid and can be used.
+else: # If the path does not exist, try to create it.
+try:
+os.makedirs(path, exist_ok=False)
+return path
+except OSError:
+continue # If the path cannot be created, then try  
another.

+
+raise Exception("Cannot find a valid location to download  
resources")


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/52423
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: I84e523f3adc182e140959243ff9335510d6b7185
Gerrit-Change-Number: 52423
Gerrit-PatchSet: 3
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
Gerrit-CC: Gabe Black 
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

[gem5-dev] Change in gem5/gem5[develop]: tests: Move MI_Example tests to Long/Nightly

2021-11-08 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52563 )



Change subject: tests: Move MI_Example tests to Long/Nightly
..

tests: Move MI_Example tests to Long/Nightly

Two tests, one in test_kvm_fork_run.py and another in
test_kvm_cpu_switch.py, were trying to run the MI_Example protocol as
part of the quick/kokoro run. MI_Example requires the building of X86,
though we try to use GCN3_X86 exclusively to avoid compiling an
additional target. As such, these MI_Example tests have been moved to
the long/nightly run.

Change-Id: I3c196e7e336148a1b7a124b5810348a2e587fe24
---
M tests/gem5/kvm-fork-tests/test_kvm_fork_run.py
M tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py
2 files changed, 22 insertions(+), 6 deletions(-)



diff --git a/tests/gem5/kvm-fork-tests/test_kvm_fork_run.py  
b/tests/gem5/kvm-fork-tests/test_kvm_fork_run.py

index c62211e..6471034 100644
--- a/tests/gem5/kvm-fork-tests/test_kvm_fork_run.py
+++ b/tests/gem5/kvm-fork-tests/test_kvm_fork_run.py
@@ -108,15 +108,15 @@
 cpu="timing", num_cpus=4, mem_system="classic",  
length=constants.quick_tag

 )

+### The long (nightly) tests 
+
 test_kvm_fork_run(
 cpu="timing",
 num_cpus=4,
 mem_system="mi_example",
-length=constants.quick_tag,
+length=constants.long_tag,
 )

-### The long (nightly) tests 
-
 test_kvm_fork_run(
 cpu="timing",
 num_cpus=1,
diff --git a/tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py  
b/tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py

index a8cbce1..36473d4 100644
--- a/tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py
+++ b/tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py
@@ -106,15 +106,15 @@
 cpu="timing", num_cpus=4, mem_system="classic",  
length=constants.quick_tag

 )

+### The long (nightly) tests 
+
 test_kvm_switch(
 cpu="timing",
 num_cpus=4,
 mem_system="mi_example",
-length=constants.quick_tag,
+length=constants.long_tag,
 )

-### The long (nightly) tests 
-
 test_kvm_switch(
 cpu="timing",
 num_cpus=1,

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/52563
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: I3c196e7e336148a1b7a124b5810348a2e587fe24
Gerrit-Change-Number: 52563
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: stdlib: Fix resource downloader download to cwd upon failure

2021-11-04 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52423 )



Change subject: stdlib: Fix resource downloader download to cwd upon failure
..

stdlib: Fix resource downloader download to cwd upon failure

There are some cases where default downloading to `~/.cache/gem5` will
not work (for example, running gem5 in a Docker container, an error
observed here:
https://gem5-review.googlesource.com/c/public/gem5/+/51950).

To fix this, the `_get_default_resource_dir` has been altered to iterate
through a list of default resource directory targets. This change will
mean if `~/.cache/gem5` is not available then the resource is downloaded
to the current working directory of gem5.

Change-Id: I84e523f3adc182e140959243ff9335510d6b7185
---
M src/python/gem5/resources/resource.py
1 file changed, 42 insertions(+), 3 deletions(-)



diff --git a/src/python/gem5/resources/resource.py  
b/src/python/gem5/resources/resource.py

index b054b09..d3f1131 100644
--- a/src/python/gem5/resources/resource.py
+++ b/src/python/gem5/resources/resource.py
@@ -102,7 +102,7 @@
 :param resource_directory: The location of the directory in which  
the
 resource is to be stored. If this parameter is not set, it will  
set to
 the environment variable `GEM5_RESOURCE_DIR`. If the environment  
is not

-set it will default to `~/.cache/gem5`.
+set it will default to `~/.cache/gem5` if availbe, otherwise the  
CWD.

 :param override: If the resource is present, but does not have the
 correct md5 value, the resoruce will be deleted and re-downloaded  
if

 this value is True. Otherwise an exception will be thrown. False by
@@ -137,8 +137,28 @@

 def _get_default_resource_dir(cls) -> str:
 """
-Obtain the default gem5 resources directory on the host system.
+Obtain the default gem5 resources directory on the host system.  
This

+function will iterate through sensible targets until one that works
+on the host system.

 :returns: The default gem5 resources directory.
 """
-return os.path.join(Path.home(), ".cache", "gem5")
+test_list = [
+# First try `~/.cache/gem5`.
+os.path.join(Path.home(), ".cache", "gem5"),
+# Last resort, just put things in the cwd.
+os.path.join(Path.cwd(), "resources"),
+]
+
+for path in test_list:
+if os.path.exists(path): # If the path already exists...
+if os.path.isdir(path): # Check to see the path is a  
directory.

+return path # If so, the path is valid and can be used.
+else: # If the path does not exist, try to create it.
+try:
+os.makedirs(path, exist_ok=False)
+return path
+except OSError:
+continue # If the path cannot be created, then try  
another.

+
+raise Exception("Cannot find a valid location to download  
resources")


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/52423
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: I84e523f3adc182e140959243ff9335510d6b7185
Gerrit-Change-Number: 52423
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: misc: Add 'stdlib' tag to MAINTAINERS.yaml

2021-11-04 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/51791 )


Change subject: misc: Add 'stdlib' tag to MAINTAINERS.yaml
..

misc: Add 'stdlib' tag to MAINTAINERS.yaml

This tag is for the "gem5 standard library" which can be found in
`src/python/gem5`.

Change-Id: Idf276635cd3f1d729cfbb4b7195b20fb6584
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51791
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M MAINTAINERS.yaml
1 file changed, 23 insertions(+), 0 deletions(-)

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




diff --git a/MAINTAINERS.yaml b/MAINTAINERS.yaml
index 7868313..c8b8957 100644
--- a/MAINTAINERS.yaml
+++ b/MAINTAINERS.yaml
@@ -201,6 +201,13 @@
   maintainers:
 - Jason Lowe-Power 

+stdlib:
+  desc: >-
+The gem5 standard library found under `src/python/gem5`
+  status: maintained
+  maintainers:
+- Bobby R. Bruce 
+
 mem:
   desc: >-
 General memory system (e.g., XBar, Packet)

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/51791
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: Idf276635cd3f1d729cfbb4b7195b20fb6584
Gerrit-Change-Number: 51791
Gerrit-PatchSet: 6
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: tests: Removing Atomic CPU with Ruby tests

2021-11-03 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52384 )


Change subject: tests: Removing Atomic CPU with Ruby tests
..

tests: Removing Atomic CPU with Ruby tests

test_kvm_fork_run.py and test_kvm_cpu_switch.py both contained tests
which attempted to run a Ruby cache with an Atomic CPU. This is not
permitted. As such these tests have been removed.

Change-Id: I7996bda6313f59f76d7f9b73bef8351d72547481
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52384
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M tests/gem5/kvm-fork-tests/test_kvm_fork_run.py
M tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py
2 files changed, 17 insertions(+), 12 deletions(-)

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




diff --git a/tests/gem5/kvm-fork-tests/test_kvm_fork_run.py  
b/tests/gem5/kvm-fork-tests/test_kvm_fork_run.py

index d12f104..c62211e 100644
--- a/tests/gem5/kvm-fork-tests/test_kvm_fork_run.py
+++ b/tests/gem5/kvm-fork-tests/test_kvm_fork_run.py
@@ -118,12 +118,6 @@
 ### The long (nightly) tests 

 test_kvm_fork_run(
-cpu="atomic",
-num_cpus=1,
-mem_system="mesi_two_level",
-length=constants.long_tag,
-)
-test_kvm_fork_run(
 cpu="timing",
 num_cpus=1,
 mem_system="mesi_two_level",
diff --git a/tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py  
b/tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py

index 19e83e5..a8cbce1 100644
--- a/tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py
+++ b/tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py
@@ -116,12 +116,6 @@
 ### The long (nightly) tests 

 test_kvm_switch(
-cpu="atomic",
-num_cpus=1,
-mem_system="mesi_two_level",
-length=constants.long_tag,
-)
-test_kvm_switch(
 cpu="timing",
 num_cpus=1,
 mem_system="mesi_two_level",

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/52384
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: I7996bda6313f59f76d7f9b73bef8351d72547481
Gerrit-Change-Number: 52384
Gerrit-PatchSet: 2
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: python: Remove incorrect usage of typing 'Optional'

2021-11-03 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52143 )


Change subject: python: Remove incorrect usage of typing 'Optional'
..

python: Remove incorrect usage of typing 'Optional'

There has been some confusion about usage of 'Optional'. In some areas
of the codebase it was assumed this specifies an optional parameter
(i.e., one which may or may not set, as it has a default value). This is
incorrect. 'Optional[]' is shorthand for 'Union[, None]',
i.e., it is used to state the value may be 'None'. This patch corrects
this throughout the gem5 codebase.

Change-Id: I77a6708dee448e8480870d073e128aed3d6ae904
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52143
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M tests/gem5/x86-boot-tests/test_linux_boot.py
M src/python/gem5/utils/requires.py
M src/python/gem5/resources/downloader.py
M src/python/gem5/components/cachehierarchies/classic/no_cache.py
M src/python/gem5/resources/resource.py
M src/python/gem5/components/cachehierarchies/classic/caches/l1dcache.py
M src/python/gem5/components/cachehierarchies/classic/caches/l1icache.py
M  
src/python/gem5/components/cachehierarchies/classic/private_l1_private_l2_cache_hierarchy.py

M src/python/gem5/components/cachehierarchies/classic/caches/mmu_cache.py
M src/python/gem5/components/boards/x86_board.py
M src/python/gem5/components/cachehierarchies/classic/caches/l2cache.py
M  
src/python/gem5/components/cachehierarchies/classic/private_l1_cache_hierarchy.py

12 files changed, 63 insertions(+), 54 deletions(-)

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




diff --git a/src/python/gem5/components/boards/x86_board.py  
b/src/python/gem5/components/boards/x86_board.py

index 49bf789..df7e7fb 100644
--- a/src/python/gem5/components/boards/x86_board.py
+++ b/src/python/gem5/components/boards/x86_board.py
@@ -271,7 +271,7 @@
 kernel: AbstractResource,
 disk_image: AbstractResource,
 command: Optional[str] = None,
-kernel_args: Optional[List[str]] = [],
+kernel_args: List[str] = [],
 ):
 """Setup the full system files

diff --git  
a/src/python/gem5/components/cachehierarchies/classic/caches/l1dcache.py  
b/src/python/gem5/components/cachehierarchies/classic/caches/l1dcache.py

index 7346e7a..c80032b 100644
--- a/src/python/gem5/components/cachehierarchies/classic/caches/l1dcache.py
+++ b/src/python/gem5/components/cachehierarchies/classic/caches/l1dcache.py
@@ -28,7 +28,7 @@

 from m5.objects import Cache, BasePrefetcher, StridePrefetcher

-from typing import Optional, Type
+from typing import Type


 class L1DCache(Cache):
@@ -39,13 +39,13 @@
 def __init__(
 self,
 size: str,
-assoc: Optional[int] = 8,
-tag_latency: Optional[int] = 1,
-data_latency: Optional[int] = 1,
-response_latency: Optional[int] = 1,
-mshrs: Optional[int] = 16,
-tgts_per_mshr: Optional[int] = 20,
-writeback_clean: Optional[bool] = True,
+assoc: int = 8,
+tag_latency: int = 1,
+data_latency: int = 1,
+response_latency: int = 1,
+mshrs: int = 16,
+tgts_per_mshr: int = 20,
+writeback_clean: bool = True,
 PrefetcherCls: Type[BasePrefetcher] = StridePrefetcher,
 ):
 super(L1DCache, self).__init__()
diff --git  
a/src/python/gem5/components/cachehierarchies/classic/caches/l1icache.py  
b/src/python/gem5/components/cachehierarchies/classic/caches/l1icache.py

index d1bf5aa..8e4ba09 100644
--- a/src/python/gem5/components/cachehierarchies/classic/caches/l1icache.py
+++ b/src/python/gem5/components/cachehierarchies/classic/caches/l1icache.py
@@ -24,7 +24,7 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-from typing import Optional, Type
+from typing import Type

 from m5.objects import Cache, BasePrefetcher, StridePrefetcher

@@ -39,13 +39,13 @@
 def __init__(
 self,
 size: str,
-assoc: Optional[int] = 8,
-tag_latency: Optional[int] = 1,
-data_latency: Optional[int] = 1,
-response_latency: Optional[int] = 1,
-mshrs: Optional[int] = 16,
-tgts_per_mshr: Optional[int] = 20,
-writeback_clean: Optional[bool] = True,
+assoc: int = 8,
+tag_latency: int = 1,
+data_latency: int = 1,
+response_latency: int = 1,
+mshrs: int = 16,
+tgts_per_mshr: int = 20,
+writeback_clean: bool = True,
 PrefetcherCls: Type[BasePrefetcher] = StridePrefetcher,
 ):
 super(L1ICache, self).__init__()
diff --git  
a/src/python/gem5/components/cachehierarchies/classic/caches/l2cache.py  

[gem5-dev] Change in gem5/gem5[develop]: tests: Removing Atomic CPU with Ruby tests

2021-11-03 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52384 )



Change subject: tests: Removing Atomic CPU with Ruby tests
..

tests: Removing Atomic CPU with Ruby tests

test_kvm_fork_run.py and test_kvm_cpu_switch.py both contained tests
which attempted to run a Ruby cache with an Atomic CPU. This is not
permitted. As such these tests have been removed.

Change-Id: I7996bda6313f59f76d7f9b73bef8351d72547481
---
M tests/gem5/kvm-fork-tests/test_kvm_fork_run.py
M tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py
2 files changed, 13 insertions(+), 12 deletions(-)



diff --git a/tests/gem5/kvm-fork-tests/test_kvm_fork_run.py  
b/tests/gem5/kvm-fork-tests/test_kvm_fork_run.py

index d12f104..c62211e 100644
--- a/tests/gem5/kvm-fork-tests/test_kvm_fork_run.py
+++ b/tests/gem5/kvm-fork-tests/test_kvm_fork_run.py
@@ -118,12 +118,6 @@
 ### The long (nightly) tests 

 test_kvm_fork_run(
-cpu="atomic",
-num_cpus=1,
-mem_system="mesi_two_level",
-length=constants.long_tag,
-)
-test_kvm_fork_run(
 cpu="timing",
 num_cpus=1,
 mem_system="mesi_two_level",
diff --git a/tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py  
b/tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py

index 19e83e5..a8cbce1 100644
--- a/tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py
+++ b/tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py
@@ -116,12 +116,6 @@
 ### The long (nightly) tests 

 test_kvm_switch(
-cpu="atomic",
-num_cpus=1,
-mem_system="mesi_two_level",
-length=constants.long_tag,
-)
-test_kvm_switch(
 cpu="timing",
 num_cpus=1,
 mem_system="mesi_two_level",

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/52384
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: I7996bda6313f59f76d7f9b73bef8351d72547481
Gerrit-Change-Number: 52384
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: configs: Move riscv_fs.py to example/gem5_library

2021-11-02 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/51789 )


Change subject: configs: Move riscv_fs.py to example/gem5_library
..

configs: Move riscv_fs.py to example/gem5_library

This commit also does some minor cleanup of the riscv_fs.py, as well as
renaming it `riscv-fs.py`.

Change-Id: I2ab5f7a3282d7eacf66a7d5b3609983d396b9218
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51789
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
R configs/example/gem5_library/riscv-fs.py
1 file changed, 24 insertions(+), 11 deletions(-)

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




diff --git a/configs/example/components-library/riscv_fs.py  
b/configs/example/gem5_library/riscv-fs.py

similarity index 91%
rename from configs/example/components-library/riscv_fs.py
rename to configs/example/gem5_library/riscv-fs.py
index 9b9d5f0..762743c 100644
--- a/configs/example/components-library/riscv_fs.py
+++ b/configs/example/gem5_library/riscv-fs.py
@@ -25,7 +25,9 @@
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 """
-This example runs a simple linux boot.
+This example runs a simple linux boot. It uses the 'riscv-disk-img'  
resource.

+It is built with the sources in `src/riscv-fs` in [gem5 resources](
+https://gem5.googlesource.com/public/gem5-resources).

 Characteristics
 ---
@@ -40,10 +42,13 @@
 import m5
 from m5.objects import Root

-from gem5.runtime import get_runtime_isa
 from gem5.components.boards.riscv_board import RiscvBoard
 from gem5.components.memory.single_channel import SingleChannelDDR3_1600
 from gem5.components.processors.simple_processor import SimpleProcessor
+from gem5.components.cachehierarchies.classic.\
+private_l1_private_l2_cache_hierarchy import (
+PrivateL1PrivateL2CacheHierarchy,
+)
 from gem5.components.processors.cpu_types import CPUTypes
 from gem5.isas import ISA
 from gem5.utils.requires import requires
@@ -52,11 +57,6 @@
 # Run a check to ensure the right version of gem5 is being used.
 requires(isa_required=ISA.RISCV)

-from  
gem5.components.cachehierarchies.classic.private_l1_private_l2_cache_hierarchy  
\

-import (
-PrivateL1PrivateL2CacheHierarchy,
-)
-
 # Setup the cache hierarchy.
 # For classic, PrivateL1PrivateL2 and NoCache have been tested.
 # For Ruby, MESI_Two_Level and MI_example have been tested.
@@ -93,7 +93,4 @@
 # using m5term (`./util/term`): `./m5term localhost `. Note the  
``

 # value is obtained from the gem5 terminal stdout. Look out for
 # "system.platform.terminal: Listening for connections on port ".
-exit_event = m5.simulate()
-print(
-"Exiting @ tick {} because {}.".format(m5.curTick(),  
exit_event.getCause())

-)
+exit_event = m5.simulate()
\ No newline at end of file

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/51789
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: I2ab5f7a3282d7eacf66a7d5b3609983d396b9218
Gerrit-Change-Number: 51789
Gerrit-PatchSet: 4
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: configs: Remove configs/example/components-library/.gitignore

2021-11-02 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/51788 )


Change subject: configs: Remove  
configs/example/components-library/.gitignore

..

configs: Remove configs/example/components-library/.gitignore

This is no longer required since resources are now downloaded to a
default location:
https://gem5-review.googlesource.com/c/public/gem5/+/51369

Change-Id: I25794063363ade5001f160e1749fcb99fe82ed24
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51788
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
D configs/example/components-library/.gitignore
1 file changed, 17 insertions(+), 4 deletions(-)

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




diff --git a/configs/example/components-library/.gitignore  
b/configs/example/components-library/.gitignore

deleted file mode 100644
index 8e91cb1..000
--- a/configs/example/components-library/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-bootloader-vmlinux-*
-riscv-disk.img*
-vmlinux-*
-boot-exit.img*

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/51788
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: I25794063363ade5001f160e1749fcb99fe82ed24
Gerrit-Change-Number: 51788
Gerrit-PatchSet: 3
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: python: Remove 'exit_on_work_items' from boards' constructor

2021-10-28 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52223 )



Change subject: python: Remove 'exit_on_work_items' from boards' constructor
..

python: Remove 'exit_on_work_items' from boards' constructor

This has been moved to the `set_kernel_disk_workload` function, and is
set to True by default.

Change-Id: I9df2fa2946dd942b5011f05b948542097310352e
---
M src/python/gem5/components/boards/simple_board.py
M src/python/gem5/components/boards/riscv_board.py
M tests/gem5/configs/boot_kvm_fork_run.py
M tests/gem5/configs/parsec_disk_run.py
M tests/gem5/configs/boot_kvm_switch_exit.py
M src/python/gem5/components/boards/x86_board.py
M src/python/gem5/components/boards/kernel_disk_workload.py
M tests/gem5/configs/x86_boot_exit_run.py
M src/python/gem5/components/boards/abstract_board.py
9 files changed, 19 insertions(+), 18 deletions(-)



diff --git a/src/python/gem5/components/boards/abstract_board.py  
b/src/python/gem5/components/boards/abstract_board.py

index 858f8e2..de23231 100644
--- a/src/python/gem5/components/boards/abstract_board.py
+++ b/src/python/gem5/components/boards/abstract_board.py
@@ -67,7 +67,6 @@
 processor: "AbstractProcessor",
 memory: "AbstractMemory",
 cache_hierarchy: "AbstractCacheHierarchy",
-exit_on_work_items: bool = False,
 ) -> None:
 super(AbstractBoard, self).__init__()
 """
@@ -75,8 +74,6 @@
 :param processor: The processor for this board.
 :param memory: The memory for this board.
 :param cache_hierarchy: The Cachie Hierarchy for this board.
-:param exit_on_work_items: Whether the simulation should exit
-on work items.
 """

 # Set up the clock domain and the voltage domain.
@@ -84,9 +81,6 @@
 self.clk_domain.clock = clk_freq
 self.clk_domain.voltage_domain = VoltageDomain()

-# Set whether to exit on work items.
-self.exit_on_work_items = exit_on_work_items
-
 # Set the processor, memory, and cache hierarchy.
 self.processor = processor
 self.memory = memory
diff --git a/src/python/gem5/components/boards/kernel_disk_workload.py  
b/src/python/gem5/components/boards/kernel_disk_workload.py

index 424d839..031fc60 100644
--- a/src/python/gem5/components/boards/kernel_disk_workload.py
+++ b/src/python/gem5/components/boards/kernel_disk_workload.py
@@ -136,6 +136,7 @@
 readfile: Optional[str] = None,
 readfile_contents: Optional[str] = None,
 kernel_args: Optional[List[str]] = None,
+exit_on_work_items: bool = True,
 ) -> None:
 """
 This function allows the setting of a full-system run with a Kernel
@@ -151,6 +152,8 @@
 be created with the value of `readfile_contents`.
 :param kernel_args: An optional parameter for setting arguments to  
be
 passed to the kernel. By default set to  
`get_default_kernel_args()`.
+:param exit_on_work_items: Whether the simulation should exit on  
work

+items. True by default.
 """

 # Set the kernel to use.
@@ -176,3 +179,6 @@
 file.close()

 self._add_disk_to_board(disk_image=disk_image)
+
+# Set whether to exit on work items.
+self.exit_on_work_items = exit_on_work_items
\ No newline at end of file
diff --git a/src/python/gem5/components/boards/riscv_board.py  
b/src/python/gem5/components/boards/riscv_board.py

index ac8440d..f64640c 100644
--- a/src/python/gem5/components/boards/riscv_board.py
+++ b/src/python/gem5/components/boards/riscv_board.py
@@ -85,11 +85,8 @@
 processor: AbstractProcessor,
 memory: AbstractMemorySystem,
 cache_hierarchy: AbstractCacheHierarchy,
-exit_on_work_items: bool = False,
 ) -> None:
-super().__init__(
-clk_freq, processor, memory, cache_hierarchy,  
exit_on_work_items

-)
+super().__init__(clk_freq, processor, memory, cache_hierarchy)
 requires(isa_required=ISA.RISCV)

 @overrides(AbstractBoard)
diff --git a/src/python/gem5/components/boards/simple_board.py  
b/src/python/gem5/components/boards/simple_board.py

index bbb3218..b3a4067 100644
--- a/src/python/gem5/components/boards/simple_board.py
+++ b/src/python/gem5/components/boards/simple_board.py
@@ -59,14 +59,12 @@
 processor: AbstractProcessor,
 memory: AbstractMemorySystem,
 cache_hierarchy: AbstractCacheHierarchy,
-exit_on_work_items: bool = False,
 ) -> None:
 super(SimpleBoard, self).__init__(
 clk_freq=clk_freq,
 processor=processor,
 memory=memory,
 cache_hierarchy=cache_hierarchy,
-exit_on_work_items=exit_on_work_items,
 )

 @overrides(AbstractBoard)
diff --git a/src/python/gem5/components/boards/x86_board.py  

[gem5-dev] Change in gem5/gem5[develop]: python: Remove incorrect usage of typing 'Optional'

2021-10-27 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52143 )



Change subject: python: Remove incorrect usage of typing 'Optional'
..

python: Remove incorrect usage of typing 'Optional'

There has been some confusion about usage of 'Optional'. In some areas
of the codebase it was assumed this specifies an optional parameter
(i.e., one which may or may not set, as it has a default value). This is
incorrect. 'Optional[]' is shorthand for 'Union[, None]',
i.e., it is used to state the value may be 'None'. This patch corrects
this throughout the gem5 codebase.

Change-Id: I77a6708dee448e8480870d073e128aed3d6ae904
---
M tests/gem5/x86-boot-tests/test_linux_boot.py
M src/python/gem5/utils/requires.py
M src/python/gem5/resources/downloader.py
M src/python/gem5/components/cachehierarchies/classic/no_cache.py
M src/python/gem5/resources/resource.py
M src/python/gem5/components/cachehierarchies/classic/caches/l1dcache.py
M src/python/gem5/components/cachehierarchies/classic/caches/l1icache.py
M  
src/python/gem5/components/cachehierarchies/classic/private_l1_private_l2_cache_hierarchy.py

M src/python/gem5/components/cachehierarchies/classic/caches/mmu_cache.py
M src/python/gem5/components/boards/x86_board.py
M src/python/gem5/components/cachehierarchies/classic/caches/l2cache.py
M  
src/python/gem5/components/cachehierarchies/classic/private_l1_cache_hierarchy.py

12 files changed, 59 insertions(+), 54 deletions(-)



diff --git a/src/python/gem5/components/boards/x86_board.py  
b/src/python/gem5/components/boards/x86_board.py

index e766c3e..2338acca 100644
--- a/src/python/gem5/components/boards/x86_board.py
+++ b/src/python/gem5/components/boards/x86_board.py
@@ -275,7 +275,7 @@
 kernel: AbstractResource,
 disk_image: AbstractResource,
 command: Optional[str] = None,
-kernel_args: Optional[List[str]] = [],
+kernel_args: List[str] = [],
 ):
 """Setup the full system files

diff --git  
a/src/python/gem5/components/cachehierarchies/classic/caches/l1dcache.py  
b/src/python/gem5/components/cachehierarchies/classic/caches/l1dcache.py

index 7346e7a..c80032b 100644
--- a/src/python/gem5/components/cachehierarchies/classic/caches/l1dcache.py
+++ b/src/python/gem5/components/cachehierarchies/classic/caches/l1dcache.py
@@ -28,7 +28,7 @@

 from m5.objects import Cache, BasePrefetcher, StridePrefetcher

-from typing import Optional, Type
+from typing import Type


 class L1DCache(Cache):
@@ -39,13 +39,13 @@
 def __init__(
 self,
 size: str,
-assoc: Optional[int] = 8,
-tag_latency: Optional[int] = 1,
-data_latency: Optional[int] = 1,
-response_latency: Optional[int] = 1,
-mshrs: Optional[int] = 16,
-tgts_per_mshr: Optional[int] = 20,
-writeback_clean: Optional[bool] = True,
+assoc: int = 8,
+tag_latency: int = 1,
+data_latency: int = 1,
+response_latency: int = 1,
+mshrs: int = 16,
+tgts_per_mshr: int = 20,
+writeback_clean: bool = True,
 PrefetcherCls: Type[BasePrefetcher] = StridePrefetcher,
 ):
 super(L1DCache, self).__init__()
diff --git  
a/src/python/gem5/components/cachehierarchies/classic/caches/l1icache.py  
b/src/python/gem5/components/cachehierarchies/classic/caches/l1icache.py

index d1bf5aa..8e4ba09 100644
--- a/src/python/gem5/components/cachehierarchies/classic/caches/l1icache.py
+++ b/src/python/gem5/components/cachehierarchies/classic/caches/l1icache.py
@@ -24,7 +24,7 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-from typing import Optional, Type
+from typing import Type

 from m5.objects import Cache, BasePrefetcher, StridePrefetcher

@@ -39,13 +39,13 @@
 def __init__(
 self,
 size: str,
-assoc: Optional[int] = 8,
-tag_latency: Optional[int] = 1,
-data_latency: Optional[int] = 1,
-response_latency: Optional[int] = 1,
-mshrs: Optional[int] = 16,
-tgts_per_mshr: Optional[int] = 20,
-writeback_clean: Optional[bool] = True,
+assoc: int = 8,
+tag_latency: int = 1,
+data_latency: int = 1,
+response_latency: int = 1,
+mshrs: int = 16,
+tgts_per_mshr: int = 20,
+writeback_clean: bool = True,
 PrefetcherCls: Type[BasePrefetcher] = StridePrefetcher,
 ):
 super(L1ICache, self).__init__()
diff --git  
a/src/python/gem5/components/cachehierarchies/classic/caches/l2cache.py  
b/src/python/gem5/components/cachehierarchies/classic/caches/l2cache.py

index f3d7c14..b326255 100644
--- a/src/python/gem5/components/cachehierarchies/classic/caches/l2cache.py
+++ b/src/python/gem5/components/cachehierarchies/classic/caches/l2cache.py
@@ -28,7 +28,7 @@

[gem5-dev] Change in gem5/gem5[develop]: tests: Update RISCV boot tests to use Ubuntu resource

2021-10-26 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52089 )



Change subject: tests: Update RISCV boot tests to use Ubuntu resource
..

tests: Update RISCV boot tests to use Ubuntu resource

This ubuntu disk image will execute an 'm5 exit' after boot and can
therefore be used to execute "boot exit" tests as part of our
long/nightly tests. These are included in this patch.

Change-Id: Ia5bdb1bfc3d9100b2ea15e23bddb49f7c4faf32d
---
M tests/gem5/riscv-boot-tests/test_linux_boot.py
M tests/gem5/configs/riscv_boot_exit_run.py
2 files changed, 79 insertions(+), 22 deletions(-)



diff --git a/tests/gem5/configs/riscv_boot_exit_run.py  
b/tests/gem5/configs/riscv_boot_exit_run.py

index 57be8aa..5e7c15a 100644
--- a/tests/gem5/configs/riscv_boot_exit_run.py
+++ b/tests/gem5/configs/riscv_boot_exit_run.py
@@ -80,7 +80,7 @@
 "-t",
 "--tick-exit",
 type=int,
-required=True,
+required=False,
 help="The tick to exit the simulation.",
 )

@@ -152,7 +152,7 @@
 resource_directory=args.resource_directory,
 ),
 disk_image=Resource(
-"riscv-disk-img",
+"riscv-ubuntu-20.04-img",
 resource_directory=args.resource_directory,
 ),
 )
diff --git a/tests/gem5/riscv-boot-tests/test_linux_boot.py  
b/tests/gem5/riscv-boot-tests/test_linux_boot.py

index 8cced2d..7c70d1d 100644
--- a/tests/gem5/riscv-boot-tests/test_linux_boot.py
+++ b/tests/gem5/riscv-boot-tests/test_linux_boot.py
@@ -26,6 +26,8 @@

 import re

+from typing import Optional
+
 from testlib import *

 if config.bin_path:
@@ -38,10 +40,11 @@
 cpu: str,
 num_cpus: int,
 cache_type: str,
-to_tick: int,
 length: str,
+to_tick: Optional[int] = None,
 ):
-name = "{}-cpu_{}-{}-cores_riscv-boot-test_to-tick".format(
+
+name = "{}-cpu_{}-{}-cores_riscv-boot-test".format(
 cpu, str(num_cpus), cache_type)

 verifiers = []
@@ -52,6 +55,21 @@
 )
 verifiers.append(verifier.MatchRegex(exit_regex))

+config_args=[
+"--cpu",
+cpu,
+"--num-cpus",
+str(num_cpus),
+"--mem-system",
+cache_type,
+"--resource-directory",
+resource_path,
+]
+
+if to_tick:
+name += "_to-tick"
+config_args += ["--tick-exit", str(to_tick)]
+
 gem5_verify_config(
 name=name,
 verifiers=verifiers,
@@ -63,18 +81,7 @@
 "configs",
 "riscv_boot_exit_run.py",
 ),
-config_args=[
-"--cpu",
-cpu,
-"--num-cpus",
-str(num_cpus),
-"--mem-system",
-cache_type,
-"--tick-exit",
-str(to_tick),
-"--resource-directory",
-resource_path,
-],
+config_args=config_args,
 valid_isas=(constants.riscv_tag,),
 valid_hosts=constants.supported_hosts,
 length=length,
@@ -87,46 +94,83 @@
 cpu="atomic",
 num_cpus=1,
 cache_type="classic",
-to_tick=100,  # Simulates 1/100th of a second.
 length=constants.quick_tag,
+to_tick=100,  # Simulates 1/100th of a second.
 )

 test_boot(
 cpu="timing",
 num_cpus=1,
 cache_type="classic",
-to_tick=100,
 length=constants.quick_tag,
+to_tick=100,
 )

 test_boot(
 cpu="timing",
 num_cpus=1,
 cache_type="mi_example",
-to_tick=100,
 length=constants.quick_tag,
+to_tick=100,
 )

 test_boot(
 cpu="o3",
 num_cpus=1,
 cache_type="classic",
-to_tick=100,
 length=constants.quick_tag,
+to_tick=100,
 )

 test_boot(
 cpu="timing",
 num_cpus=4,
 cache_type="classic",
-to_tick=100,
 length=constants.quick_tag,
+to_tick=100,
 )

 test_boot(
 cpu="timing",
 num_cpus=4,
 cache_type="mi_example",
-to_tick=100,
 length=constants.quick_tag,
+to_tick=100,
+)
+
+ The long (Nightly) tests 
+
+test_boot(
+cpu="atomic",
+num_cpus=1,
+cache_type="classic",
+length=constants.long_tag,
+)
+
+test_boot(
+cpu="timing",
+num_cpus=1,
+cache_type="mi_example",
+length=constants.long_tag,
+)
+
+test_boot(
+cpu="timing",
+num_cpus=4,
+cache_type="mi_example",
+length=constants.long_tag,
+)
+
+test_boot(
+cpu="atomic",
+num_cpus=4,
+cache_type="classic",
+length=constants.long_tag,
+)
+
+test_boot(
+cpu="o3",
+num_cpus=8,
+cache_type="mi_example",
+length=constants.long_tag,
 )

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/52089
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: Ia5bdb1bfc3d9100b2ea15e23bddb49f7c4faf32d

[gem5-dev] Change in gem5/gem5[develop]: misc: Add to KernelDiskWorkload [tomerge]

2021-10-26 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52088 )



Change subject: misc: Add to KernelDiskWorkload [tomerge]
..

misc: Add to KernelDiskWorkload [tomerge]

Change-Id: I1353f7dcc803e446bf964ddd2eda673b4adf4d46
---
M tests/gem5/configs/boot_kvm_fork_run.py
1 file changed, 10 insertions(+), 1 deletion(-)



diff --git a/tests/gem5/configs/boot_kvm_fork_run.py  
b/tests/gem5/configs/boot_kvm_fork_run.py

index 327822c..a834097 100644
--- a/tests/gem5/configs/boot_kvm_fork_run.py
+++ b/tests/gem5/configs/boot_kvm_fork_run.py
@@ -207,7 +207,7 @@
 "x86-ubuntu-img",
 resource_directory=args.resource_directory,
 ),
-command=dedent(
+readfile_contents=dedent(
 """
 m5 exit # signal end of boot
 m5 exit # exit in children and parent

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/52088
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: I1353f7dcc803e446bf964ddd2eda673b4adf4d46
Gerrit-Change-Number: 52088
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: tests,python,configs: Replace Resource override download

2021-10-26 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52086 )



Change subject: tests,python,configs: Replace Resource override download
..

tests,python,configs: Replace Resource override download

The override parameter in the constructor has been renamed to to
'download_md5_mismatch'. This makes the purpose of this parameter
clearer.

The default value has been changed from False to True. We found in most
cases we want to re-download files if the md5 values have changes. Not
wanting to do so is the corner case. This allows us to remove a lot of
parameters from test and example scripts, included in this patch.

Change-Id: I99fc7743f5adf78bf6f4f8efc6222e6df83ac6da
---
M tests/gem5/x86-boot-tests/test_linux_boot.py
M tests/gem5/riscv-boot-tests/test_linux_boot.py
M configs/example/gem5_library/arm-hello.py
M src/python/gem5/resources/downloader.py
M tests/gem5/configs/boot_kvm_fork_run.py
M tests/gem5/configs/parsec_disk_run.py
M src/python/gem5/resources/resource.py
M tests/gem5/configs/boot_kvm_switch_exit.py
M tests/gem5/hello_se/test_hello_se.py
M tests/gem5/stats/test_hdf5.py
M configs/example/gem5_library/x86-ubuntu-run.py
M tests/gem5/parsec-benchmarks/test_parsec.py
M tests/gem5/kvm-fork-tests/test_kvm_fork_run.py
M tests/gem5/configs/riscv_boot_exit_run.py
M tests/gem5/configs/simple_binary_run.py
M tests/gem5/m5_util/test_exit.py
M tests/gem5/configs/x86_boot_exit_run.py
M tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py
18 files changed, 42 insertions(+), 95 deletions(-)



diff --git a/configs/example/gem5_library/arm-hello.py  
b/configs/example/gem5_library/arm-hello.py

index 7dbc8a2..067c867 100644
--- a/configs/example/gem5_library/arm-hello.py
+++ b/configs/example/gem5_library/arm-hello.py
@@ -84,20 +84,13 @@
 # download the binary from the gem5 Resources cloud bucket if it's not  
already

 # present.
 board.set_workload(
-Resource(
-# The `Resource` class reads the `resources.json` file from the  
gem5

-# resources repository:
-# https://gem5.googlesource.com/public/gem5-resource.
-# Any resource specified in this file will be automatically  
retrieved.
-# At the time of writing, this file is a WIP and does not contain  
all
-# resources. Jira ticket:  
https://gem5.atlassian.net/browse/GEM5-1096

-"arm-hello64-static",
-# `override=True` means the if the binary already exists locally  
within
-# the resource directory, and the hash's differ to that in the  
cloud
-# bucket, the local copy will be overwritten. If this were set to  
false

-# an exception would be thrown in this case.
-override=True,
-)
+# The `Resource` class reads the `resources.json` file from the gem5
+# resources repository:
+# https://gem5.googlesource.com/public/gem5-resource.
+# Any resource specified in this file will be automatically retrieved.
+# At the time of writing, this file is a WIP and does not contain all
+# resources. Jira ticket: https://gem5.atlassian.net/browse/GEM5-1096
+Resource("arm-hello64-static")
 )

 # Lastly we setup the root, instantiate the design, and run the simulation.
diff --git a/configs/example/gem5_library/x86-ubuntu-run.py  
b/configs/example/gem5_library/x86-ubuntu-run.py

index d43b010..ea6bad4 100644
--- a/configs/example/gem5_library/x86-ubuntu-run.py
+++ b/configs/example/gem5_library/x86-ubuntu-run.py
@@ -122,20 +122,13 @@
 board.set_workload(
 # The x86 linux kernel will be automatically downloaded to the
 # `tests/gem5/resources` directory if not already present.
-kernel=Resource(
-"x86-linux-kernel-5.4.49",
-override=True,
-),
+kernel=Resource("x86-linux-kernel-5.4.49"),
 # The x86 ubuntu image will be automatically downloaded to the
 # `tests/gem5/resources` directory if not already present.
-disk_image=Resource(
-"x86-ubuntu-img",
-override=True,
-),
+disk_image=Resource("x86-ubuntu-img"),
 readfile_contents=command,
 )

-
 root = Root(full_system=True, system=board)
 root.sim_quantum = int(1e9)  # sim_quantum must be st if KVM cores are  
used.


diff --git a/src/python/gem5/resources/downloader.py  
b/src/python/gem5/resources/downloader.py

index f05d9d0..490d773 100644
--- a/src/python/gem5/resources/downloader.py
+++ b/src/python/gem5/resources/downloader.py
@@ -198,7 +198,7 @@
 resource_name: str,
 to_path: str,
 unzip: Optional[bool] = True,
-override: Optional[bool] = False,
+download_md5_mismatch: Optional[bool] = True,
 ) -> None:
 """
 Obtains a gem5 resource and stored it to a specified location. If the
@@ -212,10 +212,10 @@
 :param unzip: If true, gzipped resources will be unzipped prior to  
saving

 to `to_path`. True by default.

-:param override: If a resource is present with an 

[gem5-dev] Change in gem5/gem5[develop]: misc: update remove_directory_examples [to-merge]

2021-10-26 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/52087 )



Change subject: misc: update remove_directory_examples [to-merge]
..

misc: update remove_directory_examples [to-merge]

Change-Id: Idb7daafe689997e5bb7aaaed76517d21125340ca
---
M configs/example/gem5_library/x86-ubuntu-run.py
1 file changed, 13 insertions(+), 4 deletions(-)



diff --git a/configs/example/gem5_library/x86-ubuntu-run.py  
b/configs/example/gem5_library/x86-ubuntu-run.py

index ea6bad4..a7e5d76 100644
--- a/configs/example/gem5_library/x86-ubuntu-run.py
+++ b/configs/example/gem5_library/x86-ubuntu-run.py
@@ -120,11 +120,11 @@
 + "m5 exit;"

 board.set_workload(
-# The x86 linux kernel will be automatically downloaded to the
-# `tests/gem5/resources` directory if not already present.
+# The x86 linux kernel will be automatically downloaded to the if not
+# already present.
 kernel=Resource("x86-linux-kernel-5.4.49"),
-# The x86 ubuntu image will be automatically downloaded to the
-# `tests/gem5/resources` directory if not already present.
+# The x86 ubuntu image will be automatically downloaded to the if not
+# already present.
 disk_image=Resource("x86-ubuntu-img"),
 readfile_contents=command,
 )

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/52087
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: Idb7daafe689997e5bb7aaaed76517d21125340ca
Gerrit-Change-Number: 52087
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: misc: Add 'lib' tag to MAINTAINERS.yaml for the gem5 library

2021-10-19 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/51791 )



Change subject: misc: Add 'lib' tag to MAINTAINERS.yaml for the gem5 library
..

misc: Add 'lib' tag to MAINTAINERS.yaml for the gem5 library

Change-Id: Idf276635cd3f1d729cfbb4b7195b20fb6584
---
M MAINTAINERS.yaml
1 file changed, 16 insertions(+), 0 deletions(-)



diff --git a/MAINTAINERS.yaml b/MAINTAINERS.yaml
index 7868313..41e96f9 100644
--- a/MAINTAINERS.yaml
+++ b/MAINTAINERS.yaml
@@ -201,6 +201,13 @@
   maintainers:
 - Jason Lowe-Power 

+lib:
+  desc: >-
+The gem5 library found under `src/python/gem5`
+  status: maintained
+  maintainers:
+- Bobby R. Bruce 
+
 mem:
   desc: >-
 General memory system (e.g., XBar, Packet)

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/51791
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: Idf276635cd3f1d729cfbb4b7195b20fb6584
Gerrit-Change-Number: 51791
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: configs,tests: Add Ubuntu boot example for the gem5 library

2021-10-19 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/50888 )


Change subject: configs,tests: Add Ubuntu boot example for the gem5 library
..

configs,tests: Add Ubuntu boot example for the gem5 library

Change-Id: I5d8c0f424e661123458c0d3d55159838d4fd951d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50888
Reviewed-by: Bobby R. Bruce 
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
---
M tests/gem5/gem5_library_example_tests/test_gem5_library_examples.py
A configs/example/gem5_library/x86-ubuntu-run.py
2 files changed, 214 insertions(+), 0 deletions(-)

Approvals:
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/configs/example/gem5_library/x86-ubuntu-run.py  
b/configs/example/gem5_library/x86-ubuntu-run.py

new file mode 100644
index 000..17cabcb
--- /dev/null
+++ b/configs/example/gem5_library/x86-ubuntu-run.py
@@ -0,0 +1,178 @@
+# Copyright (c) 2021 The Regents of the University of California
+# 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.
+
+"""
+
+This script shows an example of running a full system Ubuntu boot  
simulation

+using the gem5 library. This simulation boots Ubuntu 18.04 using 2 KVM CPU
+cores. The simulation then switches to 2 Timing CPU cores before running an
+echo statement.
+
+Usage
+-
+
+```
+scons build/X86_MESI_Two_Level/gem5.opt
+./build/X86_MESI_Two_Level/gem5.opt \
+configs/example/gem5_library/x86-ubuntu-run.py
+```
+"""
+
+import m5
+from m5.objects import Root
+
+from gem5.utils.requires import requires
+from gem5.components.boards.x86_board import X86Board
+from gem5.components.memory.single_channel import SingleChannelDDR3_1600
+from gem5.components.processors.simple_switchable_processor import (
+SimpleSwitchableProcessor,
+)
+from gem5.components.processors.cpu_types import CPUTypes
+from gem5.isas import ISA
+from gem5.coherence_protocol import CoherenceProtocol
+from gem5.resources.resource import Resource
+
+import os
+
+# This runs a check to ensure the gem5 binary is compiled to X86 and to the
+# MESI Two Level coherence protocol.
+requires(
+isa_required=ISA.X86,
+coherence_protocol_required=CoherenceProtocol.MESI_TWO_LEVEL,
+kvm_required=True,
+)
+
+from gem5.components.cachehierarchies.ruby.\
+mesi_two_level_cache_hierarchy import (
+MESITwoLevelCacheHierarchy,
+)
+
+# Here we setup a MESI Two Level Cache Hierarchy.
+cache_hierarchy = MESITwoLevelCacheHierarchy(
+l1d_size="16kB",
+l1d_assoc=8,
+l1i_size="16kB",
+l1i_assoc=8,
+l2_size="256kB",
+l2_assoc=16,
+num_l2_banks=1,
+)
+
+# Setup the system memory.
+memory = SingleChannelDDR3_1600(size="3GB")
+
+# Here we setup the processor. This is a special switchable processor in  
which

+# a starting core type and a switch core type must be specified. Once a
+# configuration is instantiated a user may call `processor.switch()` to  
switch

+# from the starting core types to the switch core types. In this simulation
+# we start with KVM cores to simulate the OS boot, then switch to the  
Timing

+# cores for the command we wish to run after boot.
+processor = SimpleSwitchableProcessor(
+starting_core_type=CPUTypes.KVM,
+switch_core_type=CPUTypes.TIMING,
+num_cores=2,
+)
+
+# Here we setup the board. The X86Board allows for Full-System X86  
simulations.

+board = X86Board(
+clk_freq="3GHz",
+

[gem5-dev] Change in gem5/gem5[develop]: configs,tests: Add "Hello world" example for the gem5 library

2021-10-19 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/50887 )


Change subject: configs,tests: Add "Hello world" example for the gem5  
library

..

configs,tests: Add "Hello world" example for the gem5 library

Change-Id: Ifeb33f5425952aac113a04f8e27306476a6fc381
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50887
Reviewed-by: Bobby R. Bruce 
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
---
A configs/example/gem5_library/arm-hello.py
A tests/gem5/gem5_library_example_tests/test_gem5_library_examples.py
2 files changed, 191 insertions(+), 0 deletions(-)

Approvals:
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/configs/example/gem5_library/arm-hello.py  
b/configs/example/gem5_library/arm-hello.py

new file mode 100644
index 000..9641d2b
--- /dev/null
+++ b/configs/example/gem5_library/arm-hello.py
@@ -0,0 +1,127 @@
+# Copyright (c) 2021 The Regents of the University of California
+# 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.
+
+"""
+This gem5 configuation script creates a simple board to run an ARM
+"hello world" binary.
+
+This is setup is the close to the simplest setup possible using the gem5
+library. It does not contain any kind of caching, IO, or any non-essential
+components.
+
+Usage
+-
+
+```
+scons build/ARM/gem5.opt
+./build/ARM/gem5.opt configs/gem5_library/arm-hello.py
+```
+"""
+
+import m5
+from m5.objects import Root
+
+from gem5.isas import ISA
+from gem5.utils.requires import requires
+from gem5.resources.resource import Resource
+from gem5.components.boards.simple_board import SimpleBoard
+from gem5.components.cachehierarchies.classic.no_cache import NoCache
+from gem5.components.memory.single_channel import SingleChannelDDR3_1600
+from gem5.components.processors.simple_processor import SimpleProcessor
+from gem5.components.processors.cpu_types import CPUTypes
+
+import os
+
+# This check ensures the gem5 binary is compiled to the ARM ISA target. If  
not,

+# an exception will be thrown.
+requires(isa_required=ISA.ARM)
+
+# In this setup we don't have a cache. `NoCache` can be used for such  
setups.

+cache_hierarchy = NoCache()
+
+# We use a single channel DDR3_1600 memory system
+memory = SingleChannelDDR3_1600(size="32MB")
+
+# We use a simple Timing processor with one core.
+processor = SimpleProcessor(cpu_type=CPUTypes.TIMING, num_cores=1)
+
+# The gem5 library simble board which can be used to run simple SE-mode
+# simulations.
+board = SimpleBoard(
+clk_freq="3GHz",
+processor=processor,
+memory=memory,
+cache_hierarchy=cache_hierarchy,
+)
+
+# This method must be called to connect all the components specified during
+# the board's construction.
+board.connect_things()
+
+# Here we set the workload. In this case we want to run a simple "Hello  
World!"

+# program compiled to the ARM ISA. The `Resource` class will automatically
+# download the binary from the gem5 Resources cloud bucket if it's not  
already

+# present.
+board.set_workload(
+Resource(
+# The `Resource` class reads the `resources.json` file from the  
gem5

+# resources repository:
+# https://gem5.googlesource.com/public/gem5-resource.
+# Any resource specified in this file will be automatically  
retrieved.
+# At the time of writing, this file is a WIP and does not contain  
all
+# resources. Jira 

[gem5-dev] Change in gem5/gem5[develop]: python: Improve the print statements in downloader.py

2021-10-15 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/51370 )


Change subject: python: Improve the print statements in downloader.py
..

python: Improve the print statements in downloader.py

Most importantly, these print statements now make clear to the user
where the resources are being downloaded to.

Change-Id: Id2661d2567a7ea5ee3157142dc91e814e3e2edaf
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51370
Reviewed-by: Bobby R. Bruce 
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
---
M src/python/gem5/resources/downloader.py
1 file changed, 31 insertions(+), 4 deletions(-)

Approvals:
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/python/gem5/resources/downloader.py  
b/src/python/gem5/resources/downloader.py

index 28f813d..f05d9d0 100644
--- a/src/python/gem5/resources/downloader.py
+++ b/src/python/gem5/resources/downloader.py
@@ -274,19 +274,30 @@

 # TODO: Might be nice to have some kind of download status bar  
here.

 # TODO: There might be a case where this should be silenced.
-print("'{}' not found locally.  
Downloading...".format(resource_name))

+print(
+"Resource '{}' was not found locally. Downloading to '{}'..."
+.format(
+resource_name, download_dest
+)
+)

 # Get the URL. The URL may contain '{url_base}' which needs  
replaced

 # with the correct value.
 url = resource_json["url"].format(url_base=_get_url_base())

 _download(url=url, download_to=download_dest)
-print("Finished downloading '{}'.".format(resource_name))
+print("Finished downloading resource '{}'.".format(resource_name))

 if run_unzip:
-print("Decompressing '{}'...".format(resource_name))
+print(
+"Decompressing resource '{}' ('{}')...".format(
+resource_name, download_dest
+)
+)
 with gzip.open(download_dest, "rb") as f:
 with open(to_path, "wb") as o:
 shutil.copyfileobj(f, o)
 os.remove(download_dest)
-print("Finished decompressing '{}.".format(resource_name))
+print(
+"Finished decompressing  
resource '{}'.".format(resource_name)

+)

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/51370
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: Id2661d2567a7ea5ee3157142dc91e814e3e2edaf
Gerrit-Change-Number: 51370
Gerrit-PatchSet: 5
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: python: Set a default resource dir to download to

2021-10-15 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/51369 )


Change subject: python: Set a default resource dir to download to
..

python: Set a default resource dir to download to

Prior to this patch the downloader would download resources to the
user's pwd unless explictly stated otherwise. This patch checks the
environment variable `GEM5_RESOURCE_DIR` for a resource directory and if
this is not set, it will default to `~/.cache/gem5`.

Change-Id: I672479a37342d2a97e8ac6404775f3fd969b07b8
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51369
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M src/python/gem5/resources/resource.py
1 file changed, 46 insertions(+), 6 deletions(-)

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




diff --git a/src/python/gem5/resources/resource.py  
b/src/python/gem5/resources/resource.py

index 4e7a459..bf83e0a 100644
--- a/src/python/gem5/resources/resource.py
+++ b/src/python/gem5/resources/resource.py
@@ -26,6 +26,7 @@

 from abc import ABCMeta
 import os
+from pathlib import Path

 from .downloader import get_resource

@@ -89,21 +90,42 @@
 """
 :param resource_name: The name of the gem5 resource.
 :param resource_directory: The location of the directory in which  
the

-resource is to be stored.
+resource is to be stored. If this parameter is not set, it will  
set to
+the environment variable `GEM5_RESOURCE_DIR`. If the environment  
is not

+set it will default to `~/.cache/gem5`.
 :param override: If the resource is present, but does not have the
 correct md5 value, the resoruce will be deleted and re-downloaded  
if

 this value is True. Otherwise an exception will be thrown. False by
 default.
 """

-if resource_directory != None:
-if not os.path.exists(resource_directory):
-os.makedirs(resource_directory)
-to_path = os.path.join(resource_directory, resource_name)
+if resource_directory == None:
+resource_directory = os.getenv(
+"GEM5_RESOURCE_DIR", self._get_default_resource_dir()
+)
+
+if os.path.exists(resource_directory):
+if not os.path.isdir(resource_directory):
+raise Exception(
+"gem5 resource directory, "
+"'{}', exists but is not a directory".format(
+resource_directory
+)
+)
 else:
-to_path = resource_name
+os.makedirs(resource_directory)
+
+to_path = os.path.join(resource_directory, resource_name)

 super(Resource, self).__init__(local_path=to_path)
 get_resource(
 resource_name=resource_name, to_path=to_path, override=override
 )
+
+def _get_default_resource_dir(cls) -> str:
+"""
+Obtain the default gem5 resources directory on the host system.
+
+:returns: The default gem5 resources directory.
+"""
+return os.path.join(Path.home(), ".cache", "gem5")

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/51369
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: I672479a37342d2a97e8ac6404775f3fd969b07b8
Gerrit-Change-Number: 51369
Gerrit-PatchSet: 6
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: python: Rename 'artifact' to 'resources' in downloader

2021-10-14 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/51328 )


 (

1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the  
submitted one.

 )Change subject: python: Rename 'artifact' to 'resources' in downloader
..

python: Rename 'artifact' to 'resources' in downloader

As part of an upcoming change in the gem5 resources resources.json file,
https://gem5-review.googlesource.com/c/public/gem5-resources/+/51169,
the terminology 'artifact' will be replaced with 'resources'. This is
in-keeping with the terminology we use elsewhere in the project. This
patch is designed to work with both 'artifact' and 'resource' type name
while the resources.json schema is changed.

Change-Id: Ia1facc86000b9abf1e426b9b0eb0c7e0245bdcfa
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51328
Tested-by: kokoro 
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
---
M src/python/gem5/resources/downloader.py
1 file changed, 30 insertions(+), 7 deletions(-)

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




diff --git a/src/python/gem5/resources/downloader.py  
b/src/python/gem5/resources/downloader.py

index faeddb0..a097f24 100644
--- a/src/python/gem5/resources/downloader.py
+++ b/src/python/gem5/resources/downloader.py
@@ -88,12 +88,15 @@

 to_return = {}
 for resource in resources_group:
-if resource["type"] == "artifact":
-# If the type is "artifact" then we add it directly to the map
+# 'artifact' is the old naming, we keep it here for
+# backwards compatibility, but it can be removed with time:
+#  
https://gem5-review.googlesource.com/c/public/gem5-resources/+/51169.
+if resource["type"] == "artifact" or resource["type"]  
== "resource":

+# If the type is "resource" then we add it directly to the map
 # after a check that the name is unique.
 if resource["name"] in to_return.keys():
 raise Exception(
-"Error: Duplicate artifact with name '{}'.".format(
+"Error: Duplicate resource with name '{}'.".format(
 resource["name"]
 )
 )
@@ -108,7 +111,7 @@
 # the resources.json file. The resources names need to be
 # unique keyes.
 raise Exception(
-"Error: Duplicate artifacts with names: {}.".format(
+"Error: Duplicate resources with names: {}.".format(
 str(intersection)
 )
 )
@@ -179,16 +182,16 @@
 :raises Exception: An exception is raised if the specified resources  
does

 not exist.
 """
-artifact_map = _get_resources(_get_resources_json()["resources"])
+resource_map = _get_resources(_get_resources_json()["resources"])

-if resource_name not in artifact_map:
+if resource_name not in resource_map:
 raise Exception(
 "Error: Resource with name '{}' does not exist".format(
 resource_name
 )
 )

-return artifact_map[resource_name]
+return resource_map[resource_name]


 def get_resource(

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/51328
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: Ia1facc86000b9abf1e426b9b0eb0c7e0245bdcfa
Gerrit-Change-Number: 51328
Gerrit-PatchSet: 3
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: python: Update the gem5 lib downloader 'is_zipped' checker

2021-10-14 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/51329 )


Change subject: python: Update the gem5 lib downloader 'is_zipped' checker
..

python: Update the gem5 lib downloader 'is_zipped' checker

Previously, gem5 resources' resources.json file set the 'is_zipped'
field to a string, either "True" or "False". As JSON supports booleans,
this was updated in an upcoming patch to use boolean values instead:
https://gem5-review.googlesource.com/c/public/gem5-resources/+/51168.

This patch updates the gem5 library downloader to use the new true/false
values but remains backwards compataible with the old string-based way
of declaring the value of this field.

Change-Id: I804ce66e8ca1989955b09041b7d1c894de74dac0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51329
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M src/python/gem5/resources/downloader.py
1 file changed, 40 insertions(+), 1 deletion(-)

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




diff --git a/src/python/gem5/resources/downloader.py  
b/src/python/gem5/resources/downloader.py

index a097f24..28f813d 100644
--- a/src/python/gem5/resources/downloader.py
+++ b/src/python/gem5/resources/downloader.py
@@ -251,7 +251,24 @@
 )

 download_dest = to_path
-run_unzip = unzip and resource_json["is_zipped"].lower() == "true"
+
+# This if-statement is remain backwards compatable with the older,
+# string-based way of doing things. It can be refactored away over
+# time:
+#  
https://gem5-review.googlesource.com/c/public/gem5-resources/+/51168

+if isinstance(resource_json["is_zipped"], str):
+run_unzip = unzip and resource_json["is_zipped"].lower()  
== "true"

+elif isinstance(resource_json["is_zipped"], bool):
+run_unzip = unzip and resource_json["is_zipped"]
+else:
+raise Exception(
+"The resource.json entry for '{}' has a value for the "
+"'is_zipped' field which is neither a string or a boolean."
+.format(
+resource_name
+)
+)
+
 if run_unzip:
 download_dest += ".gz"


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/51329
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: I804ce66e8ca1989955b09041b7d1c894de74dac0
Gerrit-Change-Number: 51329
Gerrit-PatchSet: 3
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: python: Update gem5 lib downloader for new url_base field

2021-10-14 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/51327 )


Change subject: python: Update gem5 lib downloader for new url_base field
..

python: Update gem5 lib downloader for new url_base field

This patch is designed to accomodate the upcoming change to the gem5
resources resources.json file:
https://gem5-review.googlesource.com/c/public/gem5-resources/+/51167.
The change extracts the base url ('http://dist.gem5.org/dist/develop')
from the urls. This patch is both compataible with the current
resources.json scheme and the upcoming schema.

Change-Id: I2a5b87cf94ba1afcb47d1f7d3ea48d0945ff21c4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51327
Reviewed-by: Bobby R. Bruce 
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
---
M src/python/gem5/resources/downloader.py
1 file changed, 38 insertions(+), 1 deletion(-)

Approvals:
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/python/gem5/resources/downloader.py  
b/src/python/gem5/resources/downloader.py

index 5163724..faeddb0 100644
--- a/src/python/gem5/resources/downloader.py
+++ b/src/python/gem5/resources/downloader.py
@@ -67,6 +67,18 @@
 return json.loads(base64.b64decode(url.read()).decode("utf-8"))


+def _get_url_base() -> str:
+"""
+Obtains the "url_base" string from the resources.json file.
+
+:returns: The "url_base" string value from the resources.json file.
+"""
+json = _get_resources_json()
+if "url_base" in json.keys():
+return json["url_base"]
+return ""
+
+
 def _get_resources(resources_group: Dict) -> Dict[str, Dict]:
 """
 A recursive function to get all the resources.
@@ -243,7 +255,12 @@
 # TODO: Might be nice to have some kind of download status bar  
here.

 # TODO: There might be a case where this should be silenced.
 print("'{}' not found locally.  
Downloading...".format(resource_name))

-_download(url=resource_json["url"], download_to=download_dest)
+
+# Get the URL. The URL may contain '{url_base}' which needs  
replaced

+# with the correct value.
+url = resource_json["url"].format(url_base=_get_url_base())
+
+_download(url=url, download_to=download_dest)
 print("Finished downloading '{}'.".format(resource_name))

 if run_unzip:

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/51327
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: I2a5b87cf94ba1afcb47d1f7d3ea48d0945ff21c4
Gerrit-Change-Number: 51327
Gerrit-PatchSet: 3
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: tests: Re-enable 'Hello World' 32-bit tests

2021-10-14 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/51612 )


Change subject: tests: Re-enable 'Hello World' 32-bit tests
..

tests: Re-enable 'Hello World' 32-bit tests

Due to a faul recorded here:
https://gem5.atlassian.net/browse/GEM5-1074, running 32-bit binaries in
SE mode was causing a segfault to occur. These tests were therefore
disabled until a fix could be developed. A fix was submitted here:
https://gem5-review.googlesource.com/c/public/gem5/+/51489, and, as-such
the tests should be re-enabled.

Change-Id: Id01a6d85fb5e30319e53dda97f6247bcc5302477
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51612
Reviewed-by: Gabe Black 
Maintainer: Gabe Black 
Tested-by: kokoro 
---
M tests/gem5/hello_se/test_hello_se.py
1 file changed, 22 insertions(+), 4 deletions(-)

Approvals:
  Gabe Black: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/tests/gem5/hello_se/test_hello_se.py  
b/tests/gem5/hello_se/test_hello_se.py

index 4d3fb22..03ffd49 100644
--- a/tests/gem5/hello_se/test_hello_se.py
+++ b/tests/gem5/hello_se/test_hello_se.py
@@ -49,13 +49,11 @@
 static_progs = {
 constants.gcn3_x86_tag: (
 "x86-hello64-static",
-# "x86-hello32-static", # Running 32-bit binaries on gem5 is  
broken:
-#  
https://gem5.atlassian.net/browse/GEM5-1074

+"x86-hello32-static",
 ),
 constants.arm_tag: (
 "arm-hello64-static",
-# "arm-hello32-static", # Running 32-bit binaries on gem5 is  
broken.
-#  
https://gem5.atlassian.net/browse/GEM5-1074

+"arm-hello32-static",
 ),
 constants.mips_tag: ("mips-hello",),
 constants.riscv_tag: ("riscv-hello",),

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/51612
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: Id01a6d85fb5e30319e53dda97f6247bcc5302477
Gerrit-Change-Number: 51612
Gerrit-PatchSet: 2
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: tests: Re-enable 'Hello World' 32-bit tests

2021-10-13 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/51612 )



Change subject: tests: Re-enable 'Hello World' 32-bit tests
..

tests: Re-enable 'Hello World' 32-bit tests

Due to a faul recorded here:
https://gem5.atlassian.net/browse/GEM5-1074, running 32-bit binaries in
SE mode was causing a segfault to occur. These tests were therefore
disabled until a fix could be developed. A fix was submitted here:
https://gem5-review.googlesource.com/c/public/gem5/+/51489, and, as-such
the tests should be re-enabled.

Change-Id: Id01a6d85fb5e30319e53dda97f6247bcc5302477
---
M tests/gem5/hello_se/test_hello_se.py
1 file changed, 18 insertions(+), 4 deletions(-)



diff --git a/tests/gem5/hello_se/test_hello_se.py  
b/tests/gem5/hello_se/test_hello_se.py

index 4d3fb22..03ffd49 100644
--- a/tests/gem5/hello_se/test_hello_se.py
+++ b/tests/gem5/hello_se/test_hello_se.py
@@ -49,13 +49,11 @@
 static_progs = {
 constants.gcn3_x86_tag: (
 "x86-hello64-static",
-# "x86-hello32-static", # Running 32-bit binaries on gem5 is  
broken:
-#  
https://gem5.atlassian.net/browse/GEM5-1074

+"x86-hello32-static",
 ),
 constants.arm_tag: (
 "arm-hello64-static",
-# "arm-hello32-static", # Running 32-bit binaries on gem5 is  
broken.
-#  
https://gem5.atlassian.net/browse/GEM5-1074

+"arm-hello32-static",
 ),
 constants.mips_tag: ("mips-hello",),
 constants.riscv_tag: ("riscv-hello",),

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/51612
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: Id01a6d85fb5e30319e53dda97f6247bcc5302477
Gerrit-Change-Number: 51612
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: tests: Fix the nightly GPU tests

2021-10-13 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/51607 )


Change subject: tests: Fix the nightly GPU tests
..

tests: Fix the nightly GPU tests

The nightly tests failed:
https://www.mail-archive.com/gem5-dev@gem5.org/msg40828.html

This failure was due to new GPU tests assuming tests were executed from
the `tests` directory. They are actually executed from the gem5 root.
This patch fixes the error.

Change-Id: Ie5f86ef4eb13134a2a3d0291422f65c9ee355a92
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51607
Maintainer: Bobby R. Bruce 
Maintainer: Matt Sinclair 
Reviewed-by: Matt Sinclair 
Tested-by: kokoro 
---
M tests/nightly.sh
1 file changed, 26 insertions(+), 5 deletions(-)

Approvals:
  Matt Sinclair: Looks good to me, approved; Looks good to me, approved
  Bobby R. Bruce: Looks good to me, approved
  kokoro: Regressions pass




diff --git a/tests/nightly.sh b/tests/nightly.sh
index 89c7005..30e2c58 100755
--- a/tests/nightly.sh
+++ b/tests/nightly.sh
@@ -101,7 +101,7 @@
 # basic GPU functionality is working.
 docker run --rm -u $UID:$GUID --volume "${gem5_root}":"${gem5_root}" -w \
 "${gem5_root}" gcr.io/gem5-test/gcn-gpu:latest build/GCN3_X86/gem5.opt  
\
-configs/example/apu_se.py -n3 --benchmark-root="${gem5_root}/tests" -c  
square

+configs/example/apu_se.py -n3 -c square

 # get HeteroSync
 wget -qN  
http://dist.gem5.org/dist/develop/test-progs/heterosync/gcn3/allSyncPrims-1kernel

@@ -112,8 +112,8 @@
 # atomics are tested.
 docker run --rm -u $UID:$GUID --volume "${gem5_root}":"${gem5_root}" -w \
 "${gem5_root}" gcr.io/gem5-test/gcn-gpu:latest build/GCN3_X86/gem5.opt  
\

-configs/example/apu_se.py -n3 --benchmark-root="${gem5_root}/tests" \
--c allSyncPrims-1kernel --options="sleepMutex 10 16 4"
+configs/example/apu_se.py -n3  -c allSyncPrims-1kernel \
+--options="sleepMutex 10 16 4"

 # run HeteroSync LFBarr -- similar setup to sleepMutex above -- 16 WGs
 # accessing unique data and then joining a lock-free barrier, 10 Ld/St per
@@ -122,5 +122,5 @@
 # atomics are tested.
 docker run --rm -u $UID:$GUID --volume "${gem5_root}":"${gem5_root}" -w \
 "${gem5_root}" gcr.io/gem5-test/gcn-gpu:latest build/GCN3_X86/gem5.opt  
\

-configs/example/apu_se.py -n3 --benchmark-root="${gem5_root}/tests" \
--c allSyncPrims-1kernel --options="lfTreeBarrUniq 10 16 4"
+configs/example/apu_se.py -n3  -c allSyncPrims-1kernel \
+--options="lfTreeBarrUniq 10 16 4"

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/51607
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: Ie5f86ef4eb13134a2a3d0291422f65c9ee355a92
Gerrit-Change-Number: 51607
Gerrit-PatchSet: 2
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Matt Sinclair 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: tests: Fix the nightly GPU tests

2021-10-13 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/51607 )



Change subject: tests: Fix the nightly GPU tests
..

tests: Fix the nightly GPU tests

The nightly tests failed:
https://www.mail-archive.com/gem5-dev@gem5.org/msg40828.html

This failure was due to new GPU tests assuming tests were executed from
the `tests` directory. They are actually executed from the gem5 root.
This patch fixes the error.

Change-Id: Ie5f86ef4eb13134a2a3d0291422f65c9ee355a92
---
M tests/nightly.sh
1 file changed, 21 insertions(+), 5 deletions(-)



diff --git a/tests/nightly.sh b/tests/nightly.sh
index 89c7005..30e2c58 100755
--- a/tests/nightly.sh
+++ b/tests/nightly.sh
@@ -101,7 +101,7 @@
 # basic GPU functionality is working.
 docker run --rm -u $UID:$GUID --volume "${gem5_root}":"${gem5_root}" -w \
 "${gem5_root}" gcr.io/gem5-test/gcn-gpu:latest build/GCN3_X86/gem5.opt  
\
-configs/example/apu_se.py -n3 --benchmark-root="${gem5_root}/tests" -c  
square

+configs/example/apu_se.py -n3 -c square

 # get HeteroSync
 wget -qN  
http://dist.gem5.org/dist/develop/test-progs/heterosync/gcn3/allSyncPrims-1kernel

@@ -112,8 +112,8 @@
 # atomics are tested.
 docker run --rm -u $UID:$GUID --volume "${gem5_root}":"${gem5_root}" -w \
 "${gem5_root}" gcr.io/gem5-test/gcn-gpu:latest build/GCN3_X86/gem5.opt  
\

-configs/example/apu_se.py -n3 --benchmark-root="${gem5_root}/tests" \
--c allSyncPrims-1kernel --options="sleepMutex 10 16 4"
+configs/example/apu_se.py -n3  -c allSyncPrims-1kernel \
+--options="sleepMutex 10 16 4"

 # run HeteroSync LFBarr -- similar setup to sleepMutex above -- 16 WGs
 # accessing unique data and then joining a lock-free barrier, 10 Ld/St per
@@ -122,5 +122,5 @@
 # atomics are tested.
 docker run --rm -u $UID:$GUID --volume "${gem5_root}":"${gem5_root}" -w \
 "${gem5_root}" gcr.io/gem5-test/gcn-gpu:latest build/GCN3_X86/gem5.opt  
\

-configs/example/apu_se.py -n3 --benchmark-root="${gem5_root}/tests" \
--c allSyncPrims-1kernel --options="lfTreeBarrUniq 10 16 4"
+configs/example/apu_se.py -n3  -c allSyncPrims-1kernel \
+--options="lfTreeBarrUniq 10 16 4"

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/51607
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: Ie5f86ef4eb13134a2a3d0291422f65c9ee355a92
Gerrit-Change-Number: 51607
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: tests: Fix argparse description in simple_binary_run.py

2021-10-12 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/51451 )


Change subject: tests: Fix argparse description in simple_binary_run.py
..

tests: Fix argparse description in simple_binary_run.py

Change-Id: I3a86cf9e3326a06f442315d2510c5aec326af358
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51451
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M tests/gem5/configs/simple_binary_run.py
1 file changed, 14 insertions(+), 2 deletions(-)

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




diff --git a/tests/gem5/configs/simple_binary_run.py  
b/tests/gem5/configs/simple_binary_run.py

index 2c27ef7..229cebd 100644
--- a/tests/gem5/configs/simple_binary_run.py
+++ b/tests/gem5/configs/simple_binary_run.py
@@ -43,8 +43,7 @@
 import argparse

 parser = argparse.ArgumentParser(
-description="A script to run the gem5 boot test. This test boots the "
-"linux kernel."
+description="A gem5 script for running simple binaries in SE mode."
 )

 parser.add_argument(

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/51451
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: I3a86cf9e3326a06f442315d2510c5aec326af358
Gerrit-Change-Number: 51451
Gerrit-PatchSet: 2
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: tests: Fix argparse description in simple_binary_run.py

2021-10-12 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/51451 )



Change subject: tests: Fix argparse description in simple_binary_run.py
..

tests: Fix argparse description in simple_binary_run.py

Change-Id: I3a86cf9e3326a06f442315d2510c5aec326af358
---
M tests/gem5/configs/simple_binary_run.py
1 file changed, 10 insertions(+), 2 deletions(-)



diff --git a/tests/gem5/configs/simple_binary_run.py  
b/tests/gem5/configs/simple_binary_run.py

index 2c27ef7..229cebd 100644
--- a/tests/gem5/configs/simple_binary_run.py
+++ b/tests/gem5/configs/simple_binary_run.py
@@ -43,8 +43,7 @@
 import argparse

 parser = argparse.ArgumentParser(
-description="A script to run the gem5 boot test. This test boots the "
-"linux kernel."
+description="A gem5 script for running simple binaries in SE mode."
 )

 parser.add_argument(

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/51451
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: I3a86cf9e3326a06f442315d2510c5aec326af358
Gerrit-Change-Number: 51451
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: python: Improve the print statements in downloader.py

2021-10-07 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/51370 )



Change subject: python: Improve the print statements in downloader.py
..

python: Improve the print statements in downloader.py

Most importantly, these print statements now make clear to the user
where the resources are being downloaded to.

Change-Id: Id2661d2567a7ea5ee3157142dc91e814e3e2edaf
---
M src/python/gem5/resources/downloader.py
1 file changed, 19 insertions(+), 4 deletions(-)



diff --git a/src/python/gem5/resources/downloader.py  
b/src/python/gem5/resources/downloader.py

index 5163724..af1f47b 100644
--- a/src/python/gem5/resources/downloader.py
+++ b/src/python/gem5/resources/downloader.py
@@ -242,14 +242,17 @@

 # TODO: Might be nice to have some kind of download status bar  
here.

 # TODO: There might be a case where this should be silenced.
-print("'{}' not found locally.  
Downloading...".format(resource_name))

+print("Resource '{}' was not found locally. Downloading to '{}'..."
+  .format(resource_name, download_dest))
 _download(url=resource_json["url"], download_to=download_dest)
-print("Finished downloading '{}'.".format(resource_name))
+print("Finished downloading resource '{}'.".format(resource_name))

 if run_unzip:
-print("Decompressing '{}'...".format(resource_name))
+print("Decompressing resource '{}' ('{}')..."
+  .format(resource_name, download_dest))
 with gzip.open(download_dest, "rb") as f:
 with open(to_path, "wb") as o:
 shutil.copyfileobj(f, o)
 os.remove(download_dest)
-print("Finished decompressing '{}.".format(resource_name))
+print("Finished decompressing resource '{}'."
+  .format(resource_name))

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/51370
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: Id2661d2567a7ea5ee3157142dc91e814e3e2edaf
Gerrit-Change-Number: 51370
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: python: Set `~/.cache/gem5` as the default resource dir

2021-10-07 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/51369 )



Change subject: python: Set `~/.cache/gem5` as the default resource dir
..

python: Set `~/.cache/gem5` as the default resource dir

Prior to this patch the downloader would download resources to the
user's pwd. This patch sets the default download location to
`~/.cache/gem5`. The directory is created if it does not already exist.

The user may specify another directory to download to via the `Resouce`
class's constructor.

Change-Id: I672479a37342d2a97e8ac6404775f3fd969b07b8
---
M src/python/gem5/resources/resource.py
1 file changed, 38 insertions(+), 6 deletions(-)



diff --git a/src/python/gem5/resources/resource.py  
b/src/python/gem5/resources/resource.py

index 4e7a459..691180e 100644
--- a/src/python/gem5/resources/resource.py
+++ b/src/python/gem5/resources/resource.py
@@ -26,6 +26,7 @@

 from abc import ABCMeta
 import os
+from pathlib import Path

 from .downloader import get_resource

@@ -89,21 +90,36 @@
 """
 :param resource_name: The name of the gem5 resource.
 :param resource_directory: The location of the directory in which  
the

-resource is to be stored.
+resource is to be stored. If not set, it will default to
+`~/.cache/gem5`.
 :param override: If the resource is present, but does not have the
 correct md5 value, the resoruce will be deleted and re-downloaded  
if

 this value is True. Otherwise an exception will be thrown. False by
 default.
 """

-if resource_directory != None:
-if not os.path.exists(resource_directory):
-os.makedirs(resource_directory)
-to_path = os.path.join(resource_directory, resource_name)
+if resource_directory == None:
+resource_directory = self._get_default_resource_dir()
+
+if os.path.exists(resource_directory):
+if not os.path.isdir(resource_directory):
+raise Exception("gem5 resource directory, "
+"'{}', exists but is not a directory"
+.format(resource_directory))
 else:
-to_path = resource_name
+os.makedirs(resource_directory)
+
+to_path = os.path.join(resource_directory, resource_name)

 super(Resource, self).__init__(local_path=to_path)
 get_resource(
 resource_name=resource_name, to_path=to_path, override=override
 )
+
+def _get_default_resource_dir(cls) -> str:
+'''
+Obtain the default gem5 resources directory on the host system.
+
+:returns: The default gem5 resources directory.
+'''
+return os.path.join(Path.home(), ".cache", "gem5")

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/51369
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: I672479a37342d2a97e8ac6404775f3fd969b07b8
Gerrit-Change-Number: 51369
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: python: Update gem5 lib downloader for new url_base field

2021-10-06 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/51327 )



Change subject: python: Update gem5 lib downloader for new url_base field
..

python: Update gem5 lib downloader for new url_base field

This patch is designed to accomodate the upcoming change to the gem5
resources resources.json file:
https://gem5-review.googlesource.com/c/public/gem5-resources/+/51167.
The change extracts the base url ('http://dist.gem5.org/dist/develop')
from the urls. This patch is both compataible with the current
resources.json scheme and the upcoming schema.

Change-Id: I2a5b87cf94ba1afcb47d1f7d3ea48d0945ff21c4
---
M src/python/gem5/resources/downloader.py
1 file changed, 33 insertions(+), 1 deletion(-)



diff --git a/src/python/gem5/resources/downloader.py  
b/src/python/gem5/resources/downloader.py

index 5163724..13213bb 100644
--- a/src/python/gem5/resources/downloader.py
+++ b/src/python/gem5/resources/downloader.py
@@ -66,6 +66,17 @@
 with urllib.request.urlopen(_get_resources_json_uri()) as url:
 return json.loads(base64.b64decode(url.read()).decode("utf-8"))

+def _get_url_base() -> str:
+"""
+Obtains the "url_base" string from the resources.json file.
+
+:returns: The "url_base" string value from the resources.json file.
+"""
+json = _get_resources_json()
+if "url_base" in json.keys():
+return json["url_base"]
+return ""
+

 def _get_resources(resources_group: Dict) -> Dict[str, Dict]:
 """
@@ -243,7 +254,12 @@
 # TODO: Might be nice to have some kind of download status bar  
here.

 # TODO: There might be a case where this should be silenced.
 print("'{}' not found locally.  
Downloading...".format(resource_name))

-_download(url=resource_json["url"], download_to=download_dest)
+
+# Get the URL. The URL may contain '{url_base}' which needs  
replaced

+# with the correct value.
+url=resource_json["url"].format(url_base=_get_url_base())
+
+_download(url=url, download_to=download_dest)
 print("Finished downloading '{}'.".format(resource_name))

 if run_unzip:

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/51327
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: I2a5b87cf94ba1afcb47d1f7d3ea48d0945ff21c4
Gerrit-Change-Number: 51327
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: python: Update the gem5 lib downloader 'is_zipped' checker

2021-10-06 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/51329 )



Change subject: python: Update the gem5 lib downloader 'is_zipped' checker
..

python: Update the gem5 lib downloader 'is_zipped' checker

Previously, gem5 resources' resources.json file set the 'is_zipped'
field to a string, either "True" or "False". As JSON supports booleans,
this was updated in an upcoming patch to use boolean values instead:
https://gem5-review.googlesource.com/c/public/gem5-resources/+/51168.

This patch updates the gem5 library downloader to use the new true/false
values but remains backwards compataible with the old string-based way
of declaring the value of this field.

Change-Id: I804ce66e8ca1989955b09041b7d1c894de74dac0
---
M src/python/gem5/resources/downloader.py
1 file changed, 28 insertions(+), 1 deletion(-)



diff --git a/src/python/gem5/resources/downloader.py  
b/src/python/gem5/resources/downloader.py

index 018bbd5..e8161bb 100644
--- a/src/python/gem5/resources/downloader.py
+++ b/src/python/gem5/resources/downloader.py
@@ -250,7 +250,16 @@
 )

 download_dest = to_path
-run_unzip = unzip and resource_json["is_zipped"].lower() == "true"
+
+# This if-statement is remain backwards compatable with the older,
+# string-based way of doing things. It can be refactored away over
+# time:
+#  
https://gem5-review.googlesource.com/c/public/gem5-resources/+/51168

+if isinstance(resource_json["is_zipped"], str):
+run_unzip = unzip and resource_json["is_zipped"].lower()  
== "true"

+elif isinstance(resource_json["is_zipped"], bool):
+run_unzip = unzip and resource_json["is_zipped"]
+
 if run_unzip:
 download_dest += ".gz"


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/51329
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: I804ce66e8ca1989955b09041b7d1c894de74dac0
Gerrit-Change-Number: 51329
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: python: Rename 'artifact' to 'resources' in downloader

2021-10-06 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/51328 )



Change subject: python: Rename 'artifact' to 'resources' in downloader
..

python: Rename 'artifact' to 'resources' in downloader

As part of an upcoming change in the gem5 resources resources.json file,
https://gem5-review.googlesource.com/c/public/gem5-resources/+/51169,
the terminology 'artifact' will be replaced with 'resources'. This is
in-keeping with the terminology we use elsewhere in the project. This
patch is designed to work with both 'artifact' and 'resource' type name
while the resources.json schema is changed.

Change-Id: Ia1facc86000b9abf1e426b9b0eb0c7e0245bdcfa
---
M src/python/gem5/resources/downloader.py
1 file changed, 26 insertions(+), 7 deletions(-)



diff --git a/src/python/gem5/resources/downloader.py  
b/src/python/gem5/resources/downloader.py

index 13213bb..018bbd5 100644
--- a/src/python/gem5/resources/downloader.py
+++ b/src/python/gem5/resources/downloader.py
@@ -87,12 +87,15 @@

 to_return = {}
 for resource in resources_group:
-if resource["type"] == "artifact":
-# If the type is "artifact" then we add it directly to the map
+# 'artifact' is the old naming, we keep it here for
+# backwards compatibility, but it can be removed with time:
+#  
https://gem5-review.googlesource.com/c/public/gem5-resources/+/51169.
+if resource["type"] == "artifact" or resource["type"]  
== "resource":

+# If the type is "resource" then we add it directly to the map
 # after a check that the name is unique.
 if resource["name"] in to_return.keys():
 raise Exception(
-"Error: Duplicate artifact with name '{}'.".format(
+"Error: Duplicate resource with name '{}'.".format(
 resource["name"]
 )
 )
@@ -107,7 +110,7 @@
 # the resources.json file. The resources names need to be
 # unique keyes.
 raise Exception(
-"Error: Duplicate artifacts with names: {}.".format(
+"Error: Duplicate resources with names: {}.".format(
 str(intersection)
 )
 )
@@ -178,16 +181,16 @@
 :raises Exception: An exception is raised if the specified resources  
does

 not exist.
 """
-artifact_map = _get_resources(_get_resources_json()["resources"])
+resource_map = _get_resources(_get_resources_json()["resources"])

-if resource_name not in artifact_map:
+if resource_name not in resource_map:
 raise Exception(
 "Error: Resource with name '{}' does not exist".format(
 resource_name
 )
 )

-return artifact_map[resource_name]
+return resource_map[resource_name]


 def get_resource(

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/51328
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: Ia1facc86000b9abf1e426b9b0eb0c7e0245bdcfa
Gerrit-Change-Number: 51328
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: misc: Merge branch v21.1.0.2 hotfix branch into develop

2021-09-23 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/50828 )


Change subject: misc: Merge branch v21.1.0.2 hotfix branch into develop
..

misc: Merge branch v21.1.0.2 hotfix branch into develop

Change-Id: I2256ec1399528f4759a3c5c5e306d8c7a38c
---
M src/Doxyfile
M src/base/version.cc
3 files changed, 0 insertions(+), 8 deletions(-)

Approvals:
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/Doxyfile b/src/Doxyfile
index b9ea15a..dd52c25 100644
--- a/src/Doxyfile
+++ b/src/Doxyfile
@@ -31,11 +31,7 @@
 # This could be handy for archiving the generated documentation or
 # if some version control system is used.

-<<< HEAD   (c10982 tests: Update x86 boot tests to use x86-ubuntu-img)
 PROJECT_NUMBER = DEVELOP-FOR-V21-2
-===
-PROJECT_NUMBER = v21.1.0.2
->>> BRANCH (4666a4 misc: Update RELEASE-NOTES.md for v21.1.0.2)

 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
 # base path where the generated documentation will be put.
diff --git a/src/base/version.cc b/src/base/version.cc
index 84c86ce..078a2f9 100644
--- a/src/base/version.cc
+++ b/src/base/version.cc
@@ -32,10 +32,6 @@
 /**
  * @ingroup api_base_utils
  */
-<<< HEAD   (c10982 tests: Update x86 boot tests to use x86-ubuntu-img)
 const char *gem5Version = "[DEVELOP-FOR-V21.2]";
-===
-const char *gem5Version = "21.1.0.2";
->>> BRANCH (4666a4 misc: Update RELEASE-NOTES.md for v21.1.0.2)

 } // namespace gem5

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/50828
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: I2256ec1399528f4759a3c5c5e306d8c7a38c
Gerrit-Change-Number: 50828
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: tests: Fix broken compiler-tests.sh

2021-09-23 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/50829 )


Change subject: tests: Fix broken compiler-tests.sh
..

tests: Fix broken compiler-tests.sh

Change-Id: I4ab0f91fe42249acc973be20201a1bd54e582d16
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50829
Reviewed-by: Bobby R. Bruce 
Reviewed-by: Jason Lowe-Power 
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
---
M tests/compiler-tests.sh
1 file changed, 1 insertion(+), 1 deletion(-)

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




diff --git a/tests/compiler-tests.sh b/tests/compiler-tests.sh
index 699d134..12cf083 100755
--- a/tests/compiler-tests.sh
+++ b/tests/compiler-tests.sh
@@ -30,7 +30,7 @@

 # A subset of the above list: these images will build against every target,
 # ignoring builds_per_compiler.
-comprehensive=("gcc-version-11")
+comprehensive=("gcc-version-11"
"clang-version-11")

 # All build targets in build_opt/ which we want to build using each image.

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/50829
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: I4ab0f91fe42249acc973be20201a1bd54e582d16
Gerrit-Change-Number: 50829
Gerrit-PatchSet: 2
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: tests: Fix broken compiler-tests.sh

2021-09-22 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/50829 )



Change subject: tests: Fix broken compiler-tests.sh
..

tests: Fix broken compiler-tests.sh

Change-Id: I4ab0f91fe42249acc973be20201a1bd54e582d16
---
M tests/compiler-tests.sh
1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/tests/compiler-tests.sh b/tests/compiler-tests.sh
index 699d134..12cf083 100755
--- a/tests/compiler-tests.sh
+++ b/tests/compiler-tests.sh
@@ -30,7 +30,7 @@

 # A subset of the above list: these images will build against every target,
 # ignoring builds_per_compiler.
-comprehensive=("gcc-version-11")
+comprehensive=("gcc-version-11"
"clang-version-11")

 # All build targets in build_opt/ which we want to build using each image.

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/50829
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: I4ab0f91fe42249acc973be20201a1bd54e582d16
Gerrit-Change-Number: 50829
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: misc: Merge branch v21.1.0.2 hotfix branch into develop

2021-09-22 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/50828 )



Change subject: misc: Merge branch v21.1.0.2 hotfix branch into develop
..

misc: Merge branch v21.1.0.2 hotfix branch into develop

Change-Id: I2256ec1399528f4759a3c5c5e306d8c7a38c
---
M src/Doxyfile
M src/base/version.cc
3 files changed, 0 insertions(+), 8 deletions(-)



diff --git a/src/Doxyfile b/src/Doxyfile
index b9ea15a..dd52c25 100644
--- a/src/Doxyfile
+++ b/src/Doxyfile
@@ -31,11 +31,7 @@
 # This could be handy for archiving the generated documentation or
 # if some version control system is used.

-<<< HEAD   (c10982 tests: Update x86 boot tests to use x86-ubuntu-img)
 PROJECT_NUMBER = DEVELOP-FOR-V21-2
-===
-PROJECT_NUMBER = v21.1.0.2
->>> BRANCH (4666a4 misc: Update RELEASE-NOTES.md for v21.1.0.2)

 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
 # base path where the generated documentation will be put.
diff --git a/src/base/version.cc b/src/base/version.cc
index 84c86ce..078a2f9 100644
--- a/src/base/version.cc
+++ b/src/base/version.cc
@@ -32,10 +32,6 @@
 /**
  * @ingroup api_base_utils
  */
-<<< HEAD   (c10982 tests: Update x86 boot tests to use x86-ubuntu-img)
 const char *gem5Version = "[DEVELOP-FOR-V21.2]";
-===
-const char *gem5Version = "21.1.0.2";
->>> BRANCH (4666a4 misc: Update RELEASE-NOTES.md for v21.1.0.2)

 } // namespace gem5

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/50828
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: I2256ec1399528f4759a3c5c5e306d8c7a38c
Gerrit-Change-Number: 50828
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[hotfix-vector-stats]: base-stats: fix storage initializing

2021-09-22 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/50747 )


Change subject: base-stats: fix storage initializing
..

base-stats: fix storage initializing

Commit (70194795c3f41cc3f1e361b3cac24f839d86dd67) introduced std::vector  
with resize() to initializing all storages. This method caused data  
duplication in statistics. Storage is now initialized using loops.


Change-Id: I4350863a83671fc10cc02b5cb7d3b38e6cf4f565
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50747
Reviewed-by: Bobby R. Bruce 
Reviewed-by: Hoa Nguyen 
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
---
M src/base/statistics.hh
1 file changed, 12 insertions(+), 3 deletions(-)

Approvals:
  Hoa Nguyen: Looks good to me, approved
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/base/statistics.hh b/src/base/statistics.hh
index 18f52cb..8fc71eb 100644
--- a/src/base/statistics.hh
+++ b/src/base/statistics.hh
@@ -952,7 +952,10 @@
 fatal_if(s <= 0, "Storage size must be positive");
 fatal_if(check(), "Stat has already been initialized");

-storage.resize(s, new Storage(this->info()->getStorageParams()));
+storage.reserve(s);
+for (size_type i = 0; i < s; ++i)
+storage.push_back(new  
Storage(this->info()->getStorageParams()));

+
 this->setInit();
 }

@@ -1178,7 +1181,10 @@
 info->x = _x;
 info->y = _y;

-storage.resize(x * y, new Storage(info->getStorageParams()));
+storage.reserve(x * y);
+for (size_type i = 0; i < x * y; ++i)
+storage.push_back(new  
Storage(this->info()->getStorageParams()));

+
 this->setInit();

 return self;
@@ -1387,7 +1393,10 @@
 fatal_if(s <= 0, "Storage size must be positive");
 fatal_if(check(), "Stat has already been initialized");

-storage.resize(s, new Storage(this->info()->getStorageParams()));
+storage.reserve(s);
+for (size_type i = 0; i < s; ++i)
+storage.push_back(new  
Storage(this->info()->getStorageParams()));

+
 this->setInit();
 }


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


Gerrit-Project: public/gem5
Gerrit-Branch: hotfix-vector-stats
Gerrit-Change-Id: I4350863a83671fc10cc02b5cb7d3b38e6cf4f565
Gerrit-Change-Number: 50747
Gerrit-PatchSet: 2
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Hoa Nguyen 
Gerrit-Reviewer: kokoro 
Gerrit-CC: Meng Chen 
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

[gem5-dev] Change in gem5/gem5[hotfix-vector-stats]: misc: Update RELEASE-NOTES.md for v21.1.0.2

2021-09-22 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/50751 )


Change subject: misc: Update RELEASE-NOTES.md for v21.1.0.2
..

misc: Update RELEASE-NOTES.md for v21.1.0.2

Change-Id: Ib573775b9ef7de7663893f18980bb34b3d412210
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50751
Maintainer: Bobby R. Bruce 
Reviewed-by: Matt Sinclair 
Reviewed-by: Hoa Nguyen 
Tested-by: kokoro 
---
M RELEASE-NOTES.md
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Matt Sinclair: Looks good to me, approved
  Hoa Nguyen: Looks good to me, approved
  Bobby R. Bruce: Looks good to me, approved
  kokoro: Regressions pass




diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md
index a3517c1..6f672a8 100644
--- a/RELEASE-NOTES.md
+++ b/RELEASE-NOTES.md
@@ -1,3 +1,9 @@
+# Version 21.1.0.2
+
+**[HOTFIX]** [A commit introduced `std::vector` with `resize()` to  
initialize all  
storages](https://gem5-review.googlesource.com/c/public/gem5/+/27085).

+This caused data duplication in statistics and broke the Vector statistics.
+This hotfix initializes using loops which fixes the broken statistics.
+
 # Version 21.1.0.1

 **[HOTFIX]** [A "'deprecated' attribute directive ignored" warning was  
being thrown frequently when trying to build  
v21.1.0.0](https://gem5.atlassian.net/browse/GEM5-1063). While this issue  
did not break the build, it made reading the build output difficult and  
caused confused. As such a patch has been applied to fix this issue.


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


Gerrit-Project: public/gem5
Gerrit-Branch: hotfix-vector-stats
Gerrit-Change-Id: Ib573775b9ef7de7663893f18980bb34b3d412210
Gerrit-Change-Number: 50751
Gerrit-PatchSet: 2
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Hoa Nguyen 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Matt Sinclair 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[hotfix-vector-stats]: misc: Update the version to v21.1.0.2

2021-09-22 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/50750 )


Change subject: misc: Update the version to v21.1.0.2
..

misc: Update the version to v21.1.0.2

Change-Id: I4013ed678b367f95bb0f69e4a827ad04995cc3c0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50750
Maintainer: Bobby R. Bruce 
Reviewed-by: Matt Sinclair 
Reviewed-by: Hoa Nguyen 
Tested-by: kokoro 
---
M src/Doxyfile
M src/base/version.cc
2 files changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Matt Sinclair: Looks good to me, approved
  Hoa Nguyen: Looks good to me, approved
  Bobby R. Bruce: Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/Doxyfile b/src/Doxyfile
index cee1d0a..4c9f958 100644
--- a/src/Doxyfile
+++ b/src/Doxyfile
@@ -31,7 +31,7 @@
 # This could be handy for archiving the generated documentation or
 # if some version control system is used.

-PROJECT_NUMBER = v21.1.0.1
+PROJECT_NUMBER = v21.1.0.2

 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
 # base path where the generated documentation will be put.
diff --git a/src/base/version.cc b/src/base/version.cc
index 9104884..3a01cb6 100644
--- a/src/base/version.cc
+++ b/src/base/version.cc
@@ -32,6 +32,6 @@
 /**
  * @ingroup api_base_utils
  */
-const char *gem5Version = "21.1.0.1";
+const char *gem5Version = "21.1.0.2";

 } // namespace gem5

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


Gerrit-Project: public/gem5
Gerrit-Branch: hotfix-vector-stats
Gerrit-Change-Id: I4013ed678b367f95bb0f69e4a827ad04995cc3c0
Gerrit-Change-Number: 50750
Gerrit-PatchSet: 2
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Hoa Nguyen 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Matt Sinclair 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: tests: Add KVM CPU switch tests

2021-09-22 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/50487 )


Change subject: tests: Add KVM CPU switch tests
..

tests: Add KVM CPU switch tests

These test switching from KVM cores to other, more detailed cores using
the x86-ubuntu-img resource.

Change-Id: Ief5d09084a88726fc3944e0c56f3a61a5d04ec1b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50487
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
Reviewed-by: Austin Harris 
---
M tests/gem5/configs/boot_kvm_switch_exit.py
A tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py
2 files changed, 143 insertions(+), 1 deletion(-)

Approvals:
  Austin Harris: Looks good to me, approved
  Bobby R. Bruce: Looks good to me, approved
  kokoro: Regressions pass




diff --git a/tests/gem5/configs/boot_kvm_switch_exit.py  
b/tests/gem5/configs/boot_kvm_switch_exit.py

index eaf9032..79f3d86 100644
--- a/tests/gem5/configs/boot_kvm_switch_exit.py
+++ b/tests/gem5/configs/boot_kvm_switch_exit.py
@@ -196,7 +196,7 @@
 resource_directory=args.resource_directory,
 ),
 disk_image=Resource(
-"x86-boot-exit",
+"x86-ubuntu-img",
 override=args.override_download,
 resource_directory=args.resource_directory,
 ),
diff --git a/tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py  
b/tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py

new file mode 100644
index 000..19e83e5
--- /dev/null
+++ b/tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py
@@ -0,0 +1,142 @@
+# Copyright (c) 2021 The Regents of the University of California
+# 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.
+
+"""
+The purpose of this Suite of tests is to check the gem5.components  
switchable

+processor is functioning as intended; allowing switching from KVM to a more
+detailed processor.
+"""
+
+import os
+
+from testlib import *
+
+if config.bin_path:
+resource_path = config.bin_path
+else:
+resource_path = joinpath(absdirpath(__file__), "..", "resources")
+
+
+def test_kvm_switch(cpu: str, num_cpus: int, mem_system: str, length: str):
+
+if not os.access("/dev/kvm", mode=os.R_OK | os.W_OK):
+# Don't run the tests if KVM is unavailable.
+return
+
+name = "{}-cpu_{}-cores_{}_kvm-switch-test".format(
+cpu, str(num_cpus), mem_system
+)
+verifiers = []
+
+if mem_system == "mesi_two_level":
+protocol_to_use = "MESI_Two_Level"
+isa_to_use = constants.x86_tag
+elif mem_system == "mi_example":
+protocol_to_use = None
+isa_to_use = constants.x86_tag
+else:
+protocol_to_use = None
+isa_to_use = constants.gcn3_x86_tag
+
+gem5_verify_config(
+name=name,
+verifiers=verifiers,
+fixtures=(),
+config=joinpath(
+config.base_dir,
+"tests",
+"gem5",
+"configs",
+"boot_kvm_switch_exit.py",
+),
+config_args=[
+"--cpu",
+cpu,
+"--num-cpus",
+str(num_cpus),
+"--mem-system",
+mem_system,
+"--override-download",
+"--resource-directory",
+resource_path,
+"--kernel-args=''",
+],
+valid_isas=(isa_to_use,),
+valid_hosts=constants.supported_hosts,
+protocol=protocol_to_use,
+length=length,
+)
+
+
+ The quick (pre-submit/Kokoro) tests 
+

[gem5-dev] Change in gem5/gem5[develop]: tests: Update x86 boot tests to use x86-ubuntu-img

2021-09-22 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/50647 )




2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the  
submitted one.

Change subject: tests: Update x86 boot tests to use x86-ubuntu-img
..

tests: Update x86 boot tests to use x86-ubuntu-img

The x86-boot-exit resource is being deprecated for the more versatile
x86-ubuntu-img resource. The latter attempts to run `m5 readfile`,
allowing a user to specify a script to be run. If no script is specified
`m5 exit` is run. Therefore it can be used in the x86-boot-exit tests.

Change-Id: I7fecb314bd0e1d4be4f1181e57046e4621199b64
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50647
Tested-by: kokoro 
Reviewed-by: Austin Harris 
Maintainer: Bobby R. Bruce 
---
M tests/gem5/configs/x86_boot_exit_run.py
1 file changed, 1 insertion(+), 2 deletions(-)

Approvals:
  Austin Harris: Looks good to me, approved
  Bobby R. Bruce: Looks good to me, approved
  kokoro: Regressions pass




diff --git a/tests/gem5/configs/x86_boot_exit_run.py  
b/tests/gem5/configs/x86_boot_exit_run.py

index 6c5488d..fcd29e9 100644
--- a/tests/gem5/configs/x86_boot_exit_run.py
+++ b/tests/gem5/configs/x86_boot_exit_run.py
@@ -206,11 +206,10 @@
 resource_directory=args.resource_directory,
 ),
 disk_image=Resource(
-"x86-boot-exit",
+"x86-ubuntu-img",
 override=args.override_download,
 resource_directory=args.resource_directory,
 ),
-command="m5 exit \n",
 kernel_args=additional_kernal_args,
 )


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/50647
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: I7fecb314bd0e1d4be4f1181e57046e4621199b64
Gerrit-Change-Number: 50647
Gerrit-PatchSet: 4
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Austin Harris 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: tests: Add GCC-11 to the compiler tests

2021-09-21 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/50749 )


Change subject: tests: Add GCC-11 to the compiler tests
..

tests: Add GCC-11 to the compiler tests

Change-Id: I3701e850433b597fb0d6d06e058a21607e4efc88
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50749
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M tests/compiler-tests.sh
1 file changed, 3 insertions(+), 2 deletions(-)

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




diff --git a/tests/compiler-tests.sh b/tests/compiler-tests.sh
index bf1d281..699d134 100755
--- a/tests/compiler-tests.sh
+++ b/tests/compiler-tests.sh
@@ -10,7 +10,8 @@
 build_dir="${gem5_root}/build"

 # All Docker images in the gem5 testing GCR which we want to compile with.
-images=("gcc-version-10"
+images=("gcc-version-11"
+"gcc-version-10"
 "gcc-version-9"
 "gcc-version-8"
 "gcc-version-7"
@@ -29,7 +30,7 @@

 # A subset of the above list: these images will build against every target,
 # ignoring builds_per_compiler.
-comprehensive=("gcc-version-10"
+comprehensive=("gcc-version-11")
"clang-version-11")

 # All build targets in build_opt/ which we want to build using each image.

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/50749
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: I3701e850433b597fb0d6d06e058a21607e4efc88
Gerrit-Change-Number: 50749
Gerrit-PatchSet: 2
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Hoa Nguyen 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: util-docker: Add a GCC-11 Dockerfile

2021-09-21 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/50748 )


Change subject: util-docker: Add a GCC-11 Dockerfile
..

util-docker: Add a GCC-11 Dockerfile

This can be built to create an image that uses the GCC-11 compiler. At
present GCC-11 cannot be installed using APT by default. This
Dockerfile uses a special APT repository to do this and is therefore a
separate Dockerfile to the other GCC version targets.

Change-Id: Iafee92415d9047eedf3586c78722f973010f6050
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50748
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
A util/dockerfiles/ubuntu-20.04_gcc-version-11/Dockerfile
1 file changed, 52 insertions(+), 0 deletions(-)

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




diff --git a/util/dockerfiles/ubuntu-20.04_gcc-version-11/Dockerfile  
b/util/dockerfiles/ubuntu-20.04_gcc-version-11/Dockerfile

new file mode 100644
index 000..4effd9c
--- /dev/null
+++ b/util/dockerfiles/ubuntu-20.04_gcc-version-11/Dockerfile
@@ -0,0 +1,52 @@
+# Copyright (c) 2021 The Regents of the University of California
+# 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.
+FROM ubuntu:20.04
+
+# At the time of this Dockerfile's creation, Ubuntu 20.04 APT does not
+# distribute gcc-11 by default. A special APT repository is needed. We hope
+# this Dockerfile will merge with ubuntu-20.04_gcc-version once GCC-11 can  
be

+# installed via APT more easily.
+
+ENV DEBIAN_FRONTEND=noninteractive
+RUN apt -y update
+RUN apt -y upgrade
+RUN apt -y install git m4 scons zlib1g zlib1g-dev libprotobuf-dev \
+protobuf-compiler libprotoc-dev libgoogle-perftools-dev python3-dev \
+python3-six python-is-python3 doxygen libboost-all-dev  
libhdf5-serial-dev \

+python3-pydot libpng-dev make software-properties-common
+
+RUN add-apt-repository \
+'deb http://mirrors.kernel.org/ubuntu hirsute main universe'
+RUN apt -y install gcc-11 g++-11
+
+RUN update-alternatives --install \
+/usr/bin/g++ g++ /usr/bin/g++-11 100
+RUN update-alternatives --install \
+/usr/bin/gcc gcc /usr/bin/gcc-11 100
+RUN update-alternatives --install \
+/usr/bin/c++ c++ /usr/bin/g++-11 100
+RUN update-alternatives --install \
+/usr/bin/cc cc /usr/bin/gcc-11 100

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/50748
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: Iafee92415d9047eedf3586c78722f973010f6050
Gerrit-Change-Number: 50748
Gerrit-PatchSet: 2
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Hoa Nguyen 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: python: Add simulate.py to the gem5 library

2021-09-21 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/50753 )



Change subject: python: Add simulate.py to the gem5 library
..

python: Add simulate.py to the gem5 library

This replaces the `m5.simulate` and `m5.instantiate` functions, thereby
removing some gem5 boilerplate code.

Change-Id: I4706119478464efcf4d92e3a1da05bddd0953b6a
---
A src/python/gem5/simulate.py
M tests/gem5/configs/x86_boot_exit_run.py
2 files changed, 62 insertions(+), 12 deletions(-)



diff --git a/src/python/gem5/simulate.py b/src/python/gem5/simulate.py
new file mode 100644
index 000..6aaddd8
--- /dev/null
+++ b/src/python/gem5/simulate.py
@@ -0,0 +1,58 @@
+# Copyright (c) 2021 The Regents of the University of California
+# 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.
+
+import m5
+from m5.objects import Root
+
+from typing import Optional
+
+from components.boards.abstract_board import AbstractBoard
+from components.processors.cpu_types import CPUTypes
+
+instantiated: bool = False
+
+def instantiate(board: AbstractBoard, full_system: bool = True) -> None:
+
+
+if instantiated:
+raise Exception("This board has already been instantiated.")
+
+root = Root(full_system=full_system, system=board)
+
+if CPUTypes.KVM in [
+core.get_type() for core in board.get_processor().get_cores()
+]:
+root.sim_quantum = int(1e9)
+
+m5.instantiate()
+
+def simulate(to_tick: Optional[int] = None):
+if not instantiated:
+raise Exception("This board has not been instantiated.")
+
+if to_tick:
+return m5.simulate(to_tick)
+return m5.simulate()
\ No newline at end of file
diff --git a/tests/gem5/configs/x86_boot_exit_run.py  
b/tests/gem5/configs/x86_boot_exit_run.py

index 6c5488d..be25e66 100644
--- a/tests/gem5/configs/x86_boot_exit_run.py
+++ b/tests/gem5/configs/x86_boot_exit_run.py
@@ -29,7 +29,6 @@
 """

 import m5
-from m5.objects import Root

 from gem5.runtime import (
 get_runtime_coherence_protocol,
@@ -43,6 +42,7 @@
 from gem5.isas import ISA
 from gem5.coherence_protocol import CoherenceProtocol
 from gem5.resources.resource import Resource
+from gem5.simulate import instantiate, simulate

 import argparse

@@ -214,27 +214,19 @@
 kernel_args=additional_kernal_args,
 )

-
 # Begin running of the simulation. This will exit once the Linux system  
boot

 # is complete.
 print("Running with ISA: " + get_runtime_isa().name)
 print("Running with protocol: " + get_runtime_coherence_protocol().name)
 print()

-root = Root(full_system=True, system=motherboard)
-
-if args.cpu == "kvm":
-# TODO: This of annoying. Is there a way to fix this to happen
-# automatically when running KVM?
-root.sim_quantum = int(1e9)
-
-m5.instantiate()
+instantiate(board=motherboard)

 print("Beginning simulation!")
 if args.tick_exit != None:
-exit_event = m5.simulate(args.tick_exit)
+exit_event = simulate(args.tick_exit)
 else:
-exit_event = m5.simulate()
+exit_event = simulate()
 print(
 "Exiting @ tick {} because {}.".format(m5.curTick(),  
exit_event.getCause())

 )

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/50753
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: I4706119478464efcf4d92e3a1da05bddd0953b6a
Gerrit-Change-Number: 50753

[gem5-dev] Change in gem5/gem5[hotfix-vector-stats]: misc: Update the version to v21.1.0.2

2021-09-21 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/50750 )



Change subject: misc: Update the version to v21.1.0.2
..

misc: Update the version to v21.1.0.2

Change-Id: I4013ed678b367f95bb0f69e4a827ad04995cc3c0
---
M src/Doxyfile
M src/base/version.cc
2 files changed, 2 insertions(+), 2 deletions(-)



diff --git a/src/Doxyfile b/src/Doxyfile
index cee1d0a..4c9f958 100644
--- a/src/Doxyfile
+++ b/src/Doxyfile
@@ -31,7 +31,7 @@
 # This could be handy for archiving the generated documentation or
 # if some version control system is used.

-PROJECT_NUMBER = v21.1.0.1
+PROJECT_NUMBER = v21.1.0.2

 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
 # base path where the generated documentation will be put.
diff --git a/src/base/version.cc b/src/base/version.cc
index 9104884..3a01cb6 100644
--- a/src/base/version.cc
+++ b/src/base/version.cc
@@ -32,6 +32,6 @@
 /**
  * @ingroup api_base_utils
  */
-const char *gem5Version = "21.1.0.1";
+const char *gem5Version = "21.1.0.2";

 } // namespace gem5

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


Gerrit-Project: public/gem5
Gerrit-Branch: hotfix-vector-stats
Gerrit-Change-Id: I4013ed678b367f95bb0f69e4a827ad04995cc3c0
Gerrit-Change-Number: 50750
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[hotfix-vector-stats]: misc: Update RELEASE-NOTES.md for v21.1.0.2

2021-09-21 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/50751 )



Change subject: misc: Update RELEASE-NOTES.md for v21.1.0.2
..

misc: Update RELEASE-NOTES.md for v21.1.0.2

Change-Id: Ib573775b9ef7de7663893f18980bb34b3d412210
---
M RELEASE-NOTES.md
1 file changed, 6 insertions(+), 0 deletions(-)



diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md
index a3517c1..6f672a8 100644
--- a/RELEASE-NOTES.md
+++ b/RELEASE-NOTES.md
@@ -1,3 +1,9 @@
+# Version 21.1.0.2
+
+**[HOTFIX]** [A commit introduced `std::vector` with `resize()` to  
initialize all  
storages](https://gem5-review.googlesource.com/c/public/gem5/+/27085).

+This caused data duplication in statistics and broke the Vector statistics.
+This hotfix initializes using loops which fixes the broken statistics.
+
 # Version 21.1.0.1

 **[HOTFIX]** [A "'deprecated' attribute directive ignored" warning was  
being thrown frequently when trying to build  
v21.1.0.0](https://gem5.atlassian.net/browse/GEM5-1063). While this issue  
did not break the build, it made reading the build output difficult and  
caused confused. As such a patch has been applied to fix this issue.


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


Gerrit-Project: public/gem5
Gerrit-Branch: hotfix-vector-stats
Gerrit-Change-Id: Ib573775b9ef7de7663893f18980bb34b3d412210
Gerrit-Change-Number: 50751
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: util-docker: Add a GCC-11 Dockerfile

2021-09-21 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/50748 )



Change subject: util-docker: Add a GCC-11 Dockerfile
..

util-docker: Add a GCC-11 Dockerfile

This can be built to create an image that uses the GCC-11 compiler. At
present GCC-11 cannot be installed using APT by default. This
Dockerfile uses a special APT repository to do this and is therefore a
separate Dockerfile to the other GCC version targets.

Change-Id: Iafee92415d9047eedf3586c78722f973010f6050
---
A util/dockerfiles/ubuntu-20.04_gcc-version-11/Dockerfile
1 file changed, 52 insertions(+), 0 deletions(-)



diff --git a/util/dockerfiles/ubuntu-20.04_gcc-version-11/Dockerfile  
b/util/dockerfiles/ubuntu-20.04_gcc-version-11/Dockerfile

new file mode 100644
index 000..4effd9c
--- /dev/null
+++ b/util/dockerfiles/ubuntu-20.04_gcc-version-11/Dockerfile
@@ -0,0 +1,52 @@
+# Copyright (c) 2021 The Regents of the University of California
+# 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.
+FROM ubuntu:20.04
+
+# At the time of this Dockerfile's creation, Ubuntu 20.04 APT does not
+# distribute gcc-11 by default. A special APT repository is needed. We hope
+# this Dockerfile will merge with ubuntu-20.04_gcc-version once GCC-11 can  
be

+# installed via APT more easily.
+
+ENV DEBIAN_FRONTEND=noninteractive
+RUN apt -y update
+RUN apt -y upgrade
+RUN apt -y install git m4 scons zlib1g zlib1g-dev libprotobuf-dev \
+protobuf-compiler libprotoc-dev libgoogle-perftools-dev python3-dev \
+python3-six python-is-python3 doxygen libboost-all-dev  
libhdf5-serial-dev \

+python3-pydot libpng-dev make software-properties-common
+
+RUN add-apt-repository \
+'deb http://mirrors.kernel.org/ubuntu hirsute main universe'
+RUN apt -y install gcc-11 g++-11
+
+RUN update-alternatives --install \
+/usr/bin/g++ g++ /usr/bin/g++-11 100
+RUN update-alternatives --install \
+/usr/bin/gcc gcc /usr/bin/gcc-11 100
+RUN update-alternatives --install \
+/usr/bin/c++ c++ /usr/bin/g++-11 100
+RUN update-alternatives --install \
+/usr/bin/cc cc /usr/bin/gcc-11 100

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/50748
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: Iafee92415d9047eedf3586c78722f973010f6050
Gerrit-Change-Number: 50748
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: tests: Add GCC-11 to the compiler tests

2021-09-21 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/50749 )



Change subject: tests: Add GCC-11 to the compiler tests
..

tests: Add GCC-11 to the compiler tests

Change-Id: I3701e850433b597fb0d6d06e058a21607e4efc88
---
M tests/compiler-tests.sh
1 file changed, 3 insertions(+), 2 deletions(-)



diff --git a/tests/compiler-tests.sh b/tests/compiler-tests.sh
index bf1d281..699d134 100755
--- a/tests/compiler-tests.sh
+++ b/tests/compiler-tests.sh
@@ -10,7 +10,8 @@
 build_dir="${gem5_root}/build"

 # All Docker images in the gem5 testing GCR which we want to compile with.
-images=("gcc-version-10"
+images=("gcc-version-11"
+"gcc-version-10"
 "gcc-version-9"
 "gcc-version-8"
 "gcc-version-7"
@@ -29,7 +30,7 @@

 # A subset of the above list: these images will build against every target,
 # ignoring builds_per_compiler.
-comprehensive=("gcc-version-10"
+comprehensive=("gcc-version-11")
"clang-version-11")

 # All build targets in build_opt/ which we want to build using each image.

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/50749
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: I3701e850433b597fb0d6d06e058a21607e4efc88
Gerrit-Change-Number: 50749
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[hotfix-vector-stats]: base-stats: fix storage initializing

2021-09-21 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/50747 )



Change subject: base-stats: fix storage initializing
..

base-stats: fix storage initializing

Commit (70194795c3f41cc3f1e361b3cac24f839d86dd67) introduced std::vector  
with resize() to initializing all storages. This method caused data  
duplication in statistics. Storage is now initialized using loops.


Change-Id: I4350863a83671fc10cc02b5cb7d3b38e6cf4f565
---
M src/base/statistics.hh
1 file changed, 12 insertions(+), 3 deletions(-)



diff --git a/src/base/statistics.hh b/src/base/statistics.hh
index 18f52cb..8fc71eb 100644
--- a/src/base/statistics.hh
+++ b/src/base/statistics.hh
@@ -952,7 +952,10 @@
 fatal_if(s <= 0, "Storage size must be positive");
 fatal_if(check(), "Stat has already been initialized");

-storage.resize(s, new Storage(this->info()->getStorageParams()));
+storage.reserve(s);
+for (size_type i = 0; i < s; ++i)
+storage.push_back(new  
Storage(this->info()->getStorageParams()));

+
 this->setInit();
 }

@@ -1178,7 +1181,10 @@
 info->x = _x;
 info->y = _y;

-storage.resize(x * y, new Storage(info->getStorageParams()));
+storage.reserve(x * y);
+for (size_type i = 0; i < x * y; ++i)
+storage.push_back(new  
Storage(this->info()->getStorageParams()));

+
 this->setInit();

 return self;
@@ -1387,7 +1393,10 @@
 fatal_if(s <= 0, "Storage size must be positive");
 fatal_if(check(), "Stat has already been initialized");

-storage.resize(s, new Storage(this->info()->getStorageParams()));
+storage.reserve(s);
+for (size_type i = 0; i < s; ++i)
+storage.push_back(new  
Storage(this->info()->getStorageParams()));

+
 this->setInit();
 }


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


Gerrit-Project: public/gem5
Gerrit-Branch: hotfix-vector-stats
Gerrit-Change-Id: I4350863a83671fc10cc02b5cb7d3b38e6cf4f565
Gerrit-Change-Number: 50747
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-CC: Meng Chen 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: python: Move the components lib to be compiled in the binary

2021-09-20 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/49690 )


Change subject: python: Move the components lib to be compiled in the binary
..

python: Move the components lib to be compiled in the binary

There has been some debate on how best to distribute the components
library. This change builds the components library into the gem5 binary.
The components library will now function similar to the `m5` library.
There is no need for awkward imports or obtaining the library from some
third-party source.

Additional incorporated in this patch:
* Added `__init__.py` to the Python modules.
* Fixed a typo in the `abstract_ruby_cache_hierarchy.py` filename.
* Ensured that imports within the library are relative.

Issue-on: https://gem5.atlassian.net/browse/GEM5-1023
Change-Id: I3988c8710cda8dcf7b21109a2cf5c3f1608cc71a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49690
Reviewed-by: Jason Lowe-Power 
Reviewed-by: Andreas Sandberg 
Reviewed-by: Austin Harris 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M configs/example/components-library/riscv_fs.py
M src/python/SConscript
R src/python/components_library/README.md
R src/python/components_library/__init__.py
C src/python/components_library/boards/__init__.py
R src/python/components_library/boards/abstract_board.py
R src/python/components_library/boards/mem_mode.py
R src/python/components_library/boards/riscv_board.py
R src/python/components_library/boards/simple_board.py
R src/python/components_library/boards/test_board.py
R src/python/components_library/boards/x86_board.py
C src/python/components_library/cachehierarchies/__init__.py
R src/python/components_library/cachehierarchies/abstract_cache_hierarchy.py
R  
src/python/components_library/cachehierarchies/abstract_two_level_cache_hierarchy.py

C src/python/components_library/cachehierarchies/classic/__init__.py
R  
src/python/components_library/cachehierarchies/classic/abstract_classic_cache_hierarchy.py

C src/python/components_library/cachehierarchies/classic/caches/__init__.py
R src/python/components_library/cachehierarchies/classic/caches/l1dcache.py
R src/python/components_library/cachehierarchies/classic/caches/l1icache.py
R src/python/components_library/cachehierarchies/classic/caches/l2cache.py
R src/python/components_library/cachehierarchies/classic/caches/mmu_cache.py
R src/python/components_library/cachehierarchies/classic/no_cache.py
R  
src/python/components_library/cachehierarchies/classic/private_l1_cache_hierarchy.py
R  
src/python/components_library/cachehierarchies/classic/private_l1_private_l2_cache_hierarchy.py

R src/python/components_library/cachehierarchies/ruby/__init__.py
R  
src/python/components_library/cachehierarchies/ruby/abstract_ruby_cache_hierarchy.py

C src/python/components_library/cachehierarchies/ruby/caches/__init__.py
R  
src/python/components_library/cachehierarchies/ruby/caches/abstract_directory.py
R  
src/python/components_library/cachehierarchies/ruby/caches/abstract_dma_controller.py
R  
src/python/components_library/cachehierarchies/ruby/caches/abstract_l1_cache.py
R  
src/python/components_library/cachehierarchies/ruby/caches/abstract_l2_cache.py
C  
src/python/components_library/cachehierarchies/ruby/caches/mesi_two_level/__init__.py
R  
src/python/components_library/cachehierarchies/ruby/caches/mesi_two_level/directory.py
R  
src/python/components_library/cachehierarchies/ruby/caches/mesi_two_level/dma_controller.py
R  
src/python/components_library/cachehierarchies/ruby/caches/mesi_two_level/l1_cache.py
R  
src/python/components_library/cachehierarchies/ruby/caches/mesi_two_level/l2_cache.py
C  
src/python/components_library/cachehierarchies/ruby/caches/mi_example/__init__.py
R  
src/python/components_library/cachehierarchies/ruby/caches/mi_example/directory.py
R  
src/python/components_library/cachehierarchies/ruby/caches/mi_example/dma_controller.py
R  
src/python/components_library/cachehierarchies/ruby/caches/mi_example/l1_cache.py
R  
src/python/components_library/cachehierarchies/ruby/mesi_two_level_cache_hierarchy.py
R  
src/python/components_library/cachehierarchies/ruby/mi_example_cache_hierarchy.py

R src/python/components_library/cachehierarchies/ruby/topologies/__init__.py
R  
src/python/components_library/cachehierarchies/ruby/topologies/simple_pt2pt.py

R src/python/components_library/coherence_protocol.py
R src/python/components_library/isas.py
C src/python/components_library/memory/__init__.py
R src/python/components_library/memory/abstract_memory_system.py
C src/python/components_library/memory/dram_interfaces/__init__.py
R src/python/components_library/memory/dram_interfaces/ddr3.py
R src/python/components_library/memory/dram_interfaces/ddr4.py
R src/python/components_library/memory/dram_interfaces/gddr.py
R src/python/components_library/memory/dram_interfaces/hbm.py
R 

[gem5-dev] Change in gem5/gem5[develop]: python: Add connect_interrupt() to mesi_two_level for non-X86

2021-09-20 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/49928 )




10 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the  
submitted one.
Change subject: python: Add connect_interrupt() to mesi_two_level for  
non-X86

..

python: Add connect_interrupt() to mesi_two_level for non-X86

The MESITwoLevelCacheHierarchy did not call `connect_interrupt()` on
CPUs if not ISA.X86. This patch fixes this.

Change-Id: I46ae19f588e2eadce60f145067e8a7cef0d44afd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49928
Tested-by: kokoro 
Reviewed-by: Bobby R. Bruce 
Maintainer: Bobby R. Bruce 
---
M  
src/python/gem5/components/cachehierarchies/ruby/mesi_two_level_cache_hierarchy.py

1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git  
a/src/python/gem5/components/cachehierarchies/ruby/mesi_two_level_cache_hierarchy.py  
b/src/python/gem5/components/cachehierarchies/ruby/mesi_two_level_cache_hierarchy.py

index d8c972e..64eabcd 100644
---  
a/src/python/gem5/components/cachehierarchies/ruby/mesi_two_level_cache_hierarchy.py
+++  
b/src/python/gem5/components/cachehierarchies/ruby/mesi_two_level_cache_hierarchy.py

@@ -140,6 +140,8 @@
 int_req_port = cache.sequencer.interrupt_out_port
 int_resp_port = cache.sequencer.in_ports
 core.connect_interrupt(int_req_port, int_resp_port)
+else:
+core.connect_interrupt()

 self._l1_controllers.append(cache)


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/49928
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: I46ae19f588e2eadce60f145067e8a7cef0d44afd
Gerrit-Change-Number: 49928
Gerrit-PatchSet: 14
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: arch-riscv,configs,python: Update riscv_fs.py/riscv_board.py

2021-09-20 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/49867 )




13 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the  
submitted one.

Change subject: arch-riscv,configs,python: Update riscv_fs.py/riscv_board.py
..

arch-riscv,configs,python: Update riscv_fs.py/riscv_board.py

This patch incoporates improvements to the riscv_fs.py and
riscv_board.py:

* Adds 'Resource' objects to download needed resources.
* Adds 'requires' function calls where necessary.

Change-Id: I2ae4f34221d781ed6d71c9f69d56833845f537c4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49867
Tested-by: kokoro 
Reviewed-by: Bobby R. Bruce 
Reviewed-by: Jason Lowe-Power 
Maintainer: Bobby R. Bruce 
---
M configs/example/components-library/riscv_fs.py
M src/python/gem5/components/boards/riscv_board.py
2 files changed, 25 insertions(+), 51 deletions(-)

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




diff --git a/configs/example/components-library/riscv_fs.py  
b/configs/example/components-library/riscv_fs.py

index 807e35f..eadac8b 100644
--- a/configs/example/components-library/riscv_fs.py
+++ b/configs/example/components-library/riscv_fs.py
@@ -33,6 +33,8 @@
 * Runs exclusively on the RISC-V ISA with the classic caches
 * Assumes that the kernel is compiled into the bootloader
 * Automatically generates the DTB file
+* Will boot but requires a user to login using `m5term` (username: `root`,
+  password: `root`)
 """

 import m5
@@ -44,21 +46,16 @@
 from gem5.components.processors.simple_processor import SimpleProcessor
 from gem5.components.processors.cpu_types import CPUTypes
 from gem5.isas import ISA
-
-import os
-import subprocess
-import gzip
-import shutil
+from gem5.utils.requires import requires
+from gem5.resources.resource import Resource

 # Run a check to ensure the right version of gem5 is being used.
-if get_runtime_isa() != ISA.RISCV:
-raise EnvironmentError("The riscv_fs.py should be run with RISCV ISA.")
+requires(isa_required=ISA.RISCV)

 from  
gem5.components.cachehierarchies.classic.private_l1_private_l2_cache_hierarchy  
\

 import (
 PrivateL1PrivateL2CacheHierarchy,
 )
-from gem5.boards.riscv_board import RiscvBoard

 # Setup the cache hierarchy. PrivateL1PrivateL2 and NoCache have been  
tested.

 cache_hierarchy = PrivateL1PrivateL2CacheHierarchy(
@@ -81,43 +78,19 @@

 board.connect_things()

-# Download the resources as necessary.
-thispath = os.path.dirname(os.path.realpath(__file__))
-
-bootloader_url = (
-"http://dist.gem5.org/dist/develop/kernels/;
-"riscv/static/bootloader-vmlinux-5.10"
-)
-bootloader_path = os.path.join(thispath, "bootloader-vmlinux-5.10")
-if not os.path.exists(bootloader_path):
-subprocess.run(["wget", "-P", thispath, bootloader_url])
-
-boot_img_url = (
-"http://dist.gem5.org/dist/develop/images/riscv/busybox/riscv-disk.img.gz;
-)
-boot_img_path_gz = os.path.join(thispath, "riscv-disk.img.gz")
-boot_img_path = os.path.join(thispath, "riscv-disk.img")
-
-if not os.path.exists(boot_img_path):
-subprocess.run(["wget", "-P", thispath, boot_img_url])
-with gzip.open(boot_img_path_gz, "rb") as f:
-with open(boot_img_path, "wb") as o:
-shutil.copyfileobj(f, o)
-
 # Set the Full System workload.
-board.set_workload(disk_image=boot_img_path, bootloader=bootloader_path)
-
-
-# Begin running of the simulation. This will exit once the Linux system  
boot

-# is complete.
-print("Running with ISA: " + get_runtime_isa().name)
-print()
+board.set_workload(disk_image=Resource("riscv-disk-img"),
+   bootloader=Resource("riscv-bootloader-vmlinux-5.10"))

 root = Root(full_system=True, system=board)

 m5.instantiate()

 print("Beginning simulation!")
+# Note: This simulation will never stop. You can access the terminal upon  
boot
+# using m5term (`./util/term`): `./m5term localhost `. Note the  
``

+# value is obtained from the gem5 terminal stdout. Look out for
+# "system.platform.terminal: Listening for connections on port ".
 exit_event = m5.simulate()
 print(
 "Exiting @ tick {} because {}.".format(m5.curTick(),  
exit_event.getCause())
diff --git a/src/python/gem5/components/boards/riscv_board.py  
b/src/python/gem5/components/boards/riscv_board.py

index dc8f799..2cc151d 100644
--- a/src/python/gem5/components/boards/riscv_board.py
+++ b/src/python/gem5/components/boards/riscv_board.py
@@ -33,8 +33,10 @@
 from ..processors.abstract_processor import AbstractProcessor
 from ..memory.abstract_memory_system import AbstractMemorySystem
 from ..cachehierarchies.abstract_cache_hierarchy import  
AbstractCacheHierarchy

+from ...resources.resource import AbstractResource
+
 from ...isas import ISA
-from ...runtime import 

[gem5-dev] Change in gem5/gem5[develop]: python: Remove 'is_ruby' function

2021-09-20 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/50168 )




3 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the  
submitted one.

Change subject: python: Remove 'is_ruby' function
..

python: Remove 'is_ruby' function

This function is not used and should not be used. It does not really
make any sense.

Change-Id: I79ee7283ddbc282b9b803df33ad266b7a88a9c67
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50168
Tested-by: kokoro 
Reviewed-by: Jason Lowe-Power 
Maintainer: Bobby R. Bruce 
---
M src/python/gem5/coherence_protocol.py
1 file changed, 1 insertion(+), 21 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved
  Bobby R. Bruce: Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/python/gem5/coherence_protocol.py  
b/src/python/gem5/coherence_protocol.py

index 06375e3..275a304 100644
--- a/src/python/gem5/coherence_protocol.py
+++ b/src/python/gem5/coherence_protocol.py
@@ -42,24 +42,4 @@
 MOESI_AMD_BASE = 8
 MI_EXAMPLE = 9
 GPU_VIPER = 10
-CHI = 11
-
-
-def is_ruby(protocol: CoherenceProtocol) -> bool:
-"""Specifies if a given protocol is Ruby or not
-
-:returns: True if the given protocol is Ruby, otherwise false
-"""
-ruby = (
-CoherenceProtocol.MESI_THREE_LEVEL,
-CoherenceProtocol.MESI_THREE_LEVEL_HTM,
-CoherenceProtocol.ARM_MOESI_HAMMER,
-CoherenceProtocol.GARNET_STANDALONE,
-CoherenceProtocol.MESI_TWO_LEVEL,
-CoherenceProtocol.MOESI_CMP_DIRECTORY,
-CoherenceProtocol.MOESI_CMP_TOKEN,
-CoherenceProtocol.MOESI_AMD_BASE,
-CoherenceProtocol.GPU_VIPER,
-)
-
-return protocol in ruby
+CHI = 11
\ No newline at end of file

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/50168
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: I79ee7283ddbc282b9b803df33ad266b7a88a9c67
Gerrit-Change-Number: 50168
Gerrit-PatchSet: 6
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: arch-x86,tests: Rename boot_exit_disk_run.py

2021-09-20 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/49868 )




12 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the  
submitted one.

Change subject: arch-x86,tests: Rename boot_exit_disk_run.py
..

arch-x86,tests: Rename boot_exit_disk_run.py

Rename to 'x86_boot_exit_run.py'. It's X86 specific and the name should
make this obvious.

Change-Id: Iab124b166f16a3dfbe4f3a5a455166744c3b1a2d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49868
Tested-by: kokoro 
Reviewed-by: Bobby R. Bruce 
Maintainer: Bobby R. Bruce 
---
R tests/gem5/configs/x86_boot_exit_run.py
M tests/gem5/x86-boot-tests/test_linux_boot.py
2 files changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/tests/gem5/configs/boot_exit_disk_run.py  
b/tests/gem5/configs/x86_boot_exit_run.py

similarity index 100%
rename from tests/gem5/configs/boot_exit_disk_run.py
rename to tests/gem5/configs/x86_boot_exit_run.py
diff --git a/tests/gem5/x86-boot-tests/test_linux_boot.py  
b/tests/gem5/x86-boot-tests/test_linux_boot.py

index f1fba8f..124ea8e 100644
--- a/tests/gem5/x86-boot-tests/test_linux_boot.py
+++ b/tests/gem5/x86-boot-tests/test_linux_boot.py
@@ -80,7 +80,7 @@
 "tests",
 "gem5",
 "configs",
-"boot_exit_disk_run.py",
+"x86_boot_exit_run.py",
 ),
 config_args=[
 "--cpu",

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/49868
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: Iab124b166f16a3dfbe4f3a5a455166744c3b1a2d
Gerrit-Change-Number: 49868
Gerrit-PatchSet: 16
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: arch-riscv,tests: Add RISCV boot tests

2021-09-20 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/49869 )


Change subject: arch-riscv,tests: Add RISCV boot tests
..

arch-riscv,tests: Add RISCV boot tests

This adds RISCV boot tests. Due to TODO items highlighted here:
https://gem5.atlassian.net/browse/GEM5-1080, these tests only run to a
tick as the RISCV disk image does not contain the necessary features to
run a proper "boot-exit" test as we do with the X86 boot tests.

Change-Id: I0744ff46f78e6ec83b7eabf53146397caad9b97a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49869
Reviewed-by: Bobby R. Bruce 
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
---
A tests/gem5/configs/riscv_boot_exit_run.py
A tests/gem5/riscv-boot-tests/test_linux_boot.py
2 files changed, 266 insertions(+), 0 deletions(-)

Approvals:
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/tests/gem5/configs/riscv_boot_exit_run.py  
b/tests/gem5/configs/riscv_boot_exit_run.py

new file mode 100644
index 000..b97c8ad
--- /dev/null
+++ b/tests/gem5/configs/riscv_boot_exit_run.py
@@ -0,0 +1,157 @@
+# Copyright (c) 2021 The Regents of the University of California
+# 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.
+
+"""
+This example runs a simple linux boot on the RiscvBoard.
+
+Characteristics
+---
+
+* Runs exclusively on the RISC-V ISA with the classic caches
+"""
+
+import m5
+from m5.objects import Root
+
+from gem5.components.memory.single_channel import SingleChannelDDR3_1600
+from gem5.components.processors.simple_processor import SimpleProcessor
+from gem5.components.processors.cpu_types import CPUTypes
+from gem5.isas import ISA
+from gem5.utils.requires import requires
+from gem5.resources.resource import Resource
+
+import argparse
+
+parser = argparse.ArgumentParser(
+description="A script to run the RISCV boot exit tests."
+)
+
+parser.add_argument(
+"-n",
+"--num-cpus",
+type=int,
+required=True,
+help="The number of CPUs.",
+)
+
+parser.add_argument(
+"-c",
+"--cpu",
+type=str,
+choices=("kvm", "atomic", "timing", "o3"),
+required=True,
+help="The CPU type.",
+)
+
+parser.add_argument(
+"-t",
+"--tick-exit",
+type=int,
+required=True,
+help="The tick to exit the simulation.",
+)
+
+parser.add_argument(
+"-r",
+"--resource-directory",
+type=str,
+required=False,
+help="The directory in which resources will be downloaded or exist.",
+)
+
+parser.add_argument(
+"-o",
+"--override-download",
+action="store_true",
+help="Override a local resource if the hashes do not match.",
+)
+
+args = parser.parse_args()
+
+# Run a check to ensure the right version of gem5 is being used.
+requires(isa_required=ISA.RISCV)
+
+from gem5.components.cachehierarchies.classic.\
+private_l1_private_l2_cache_hierarchy import \
+PrivateL1PrivateL2CacheHierarchy
+from gem5.components.boards.riscv_board import RiscvBoard
+
+# Setup the cache hierarchy.
+cache_hierarchy = PrivateL1PrivateL2CacheHierarchy(
+l1d_size="32KiB", l1i_size="32KiB", l2_size="512KiB"
+)
+
+# Setup the system memory.
+memory = SingleChannelDDR3_1600()
+
+# Setup a processor.
+if args.cpu == "kvm":
+cpu_type = CPUTypes.KVM
+elif args.cpu == "atomic":
+cpu_type = CPUTypes.ATOMIC
+elif args.cpu == "timing":
+cpu_type = CPUTypes.TIMING
+elif args.cpu == "o3":

[gem5-dev] Change in gem5/gem5[develop]: python: Add `has_dma_ports` check to mesi_two_level

2021-09-20 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/49929 )




10 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the  
submitted one.

Change subject: python: Add `has_dma_ports` check to mesi_two_level
..

python: Add `has_dma_ports` check to mesi_two_level

Previously the MesiTwoLevelCacheHierarchy assumed the board had dma
ports. This change adds a simple check and skips adding the
DMASequencers if the board does not have any.

Change-Id: I64ee68267d16c9d9a6096ba7fd660f04515b2b3c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49929
Tested-by: kokoro 
Reviewed-by: Bobby R. Bruce 
Maintainer: Bobby R. Bruce 
---
M  
src/python/gem5/components/cachehierarchies/ruby/mesi_two_level_cache_hierarchy.py

1 file changed, 7 insertions(+), 6 deletions(-)

Approvals:
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git  
a/src/python/gem5/components/cachehierarchies/ruby/mesi_two_level_cache_hierarchy.py  
b/src/python/gem5/components/cachehierarchies/ruby/mesi_two_level_cache_hierarchy.py

index 64eabcd..e5d0353 100644
---  
a/src/python/gem5/components/cachehierarchies/ruby/mesi_two_level_cache_hierarchy.py
+++  
b/src/python/gem5/components/cachehierarchies/ruby/mesi_two_level_cache_hierarchy.py

@@ -169,13 +169,14 @@
 for dir in self._directory_controllers:
 dir.ruby_system = self.ruby_system

-dma_ports = board.get_dma_ports()
 self._dma_controllers = []
-for i, port in enumerate(dma_ports):
-ctrl = DMAController(self.ruby_system.network, cache_line_size)
-ctrl.dma_sequencer = DMASequencer(version=i, in_ports=port)
-self._dma_controllers.append(ctrl)
-ctrl.ruby_system = self.ruby_system
+if board.has_dma_ports():
+dma_ports = board.get_dma_ports()
+for i, port in enumerate(dma_ports):
+ctrl = DMAController(self.ruby_system.network,  
cache_line_size)

+ctrl.dma_sequencer = DMASequencer(version=i, in_ports=port)
+self._dma_controllers.append(ctrl)
+ctrl.ruby_system = self.ruby_system

 self.ruby_system.num_of_sequencers = len(self._l1_controllers) +  
len(

 self._dma_controllers

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/49929
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: I64ee68267d16c9d9a6096ba7fd660f04515b2b3c
Gerrit-Change-Number: 49929
Gerrit-PatchSet: 14
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: tests: Update x86 boot tests to use x86-ubuntu-img

2021-09-20 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/50647 )



Change subject: tests: Update x86 boot tests to use x86-ubuntu-img
..

tests: Update x86 boot tests to use x86-ubuntu-img

The x86-boot-exit resource is being deprecated for the more versatile
x86-ubuntu-img resource. The latter attempts to run `m5 readfile`,
allowing a user to specify a script to be run. If no script is specified
`m5 exit` is run. Therefore it can be used in the x86-boot-exit tests.

Change-Id: I7fecb314bd0e1d4be4f1181e57046e4621199b64
---
M tests/gem5/configs/x86_boot_exit_run.py
1 file changed, 1 insertion(+), 2 deletions(-)



diff --git a/tests/gem5/configs/x86_boot_exit_run.py  
b/tests/gem5/configs/x86_boot_exit_run.py

index 6c5488d..fcd29e9 100644
--- a/tests/gem5/configs/x86_boot_exit_run.py
+++ b/tests/gem5/configs/x86_boot_exit_run.py
@@ -206,11 +206,10 @@
 resource_directory=args.resource_directory,
 ),
 disk_image=Resource(
-"x86-boot-exit",
+"x86-ubuntu-img",
 override=args.override_download,
 resource_directory=args.resource_directory,
 ),
-command="m5 exit \n",
 kernel_args=additional_kernal_args,
 )


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/50647
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: I7fecb314bd0e1d4be4f1181e57046e4621199b64
Gerrit-Change-Number: 50647
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: cpu-o3: Add Data Abort handler for Atomic Instructions

2021-09-17 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/35295 )


Change subject: cpu-o3: Add Data Abort handler for Atomic Instructions
..

cpu-o3: Add Data Abort handler for Atomic Instructions

Bug fixing patch for Data Abort exception when executing an
atomic instruction. You can see the details in this JIRA ticket:
https://gem5.atlassian.net/browse/GEM5-784

Change-Id: I79e7113efd8157fba61b6d4a0b0c09bc6f85ec29
Signed-off-by: Víctor Soria 
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35295
Reviewed-by: Giacomo Travaglini 
Maintainer: Giacomo Travaglini 
Tested-by: kokoro 
---
M src/cpu/o3/lsq_unit.cc
1 file changed, 11 insertions(+), 0 deletions(-)

Approvals:
  Giacomo Travaglini: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/cpu/o3/lsq_unit.cc b/src/cpu/o3/lsq_unit.cc
index 039184d..34f65b9 100644
--- a/src/cpu/o3/lsq_unit.cc
+++ b/src/cpu/o3/lsq_unit.cc
@@ -700,6 +700,17 @@
 DPRINTF(LSQUnit,"Fault on Store PC %s, [sn:%lli], Size = 0\n",
 store_inst->pcState(), store_inst->seqNum);

+if (store_inst->isAtomic()) {
+// If the instruction faulted, then we need to send it along
+// to commit without the instruction completing.
+if (!(store_inst->hasRequest() &&  
store_inst->strictlyOrdered()) ||

+store_inst->isAtCommit()) {
+store_inst->setExecuted();
+}
+iewStage->instToCommit(store_inst);
+iewStage->activityThisCycle();
+}
+
 return store_fault;
 }


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/35295
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: I79e7113efd8157fba61b6d4a0b0c09bc6f85ec29
Gerrit-Change-Number: 35295
Gerrit-PatchSet: 4
Gerrit-Owner: Victor Soria 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Giacomo Travaglini 
Gerrit-Reviewer: Jordi Vaquero 
Gerrit-Reviewer: Nikos Nikoleris 
Gerrit-Reviewer: Tiago Mück 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: tests: [WIP] Add KVM CPU switch tests

2021-09-16 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/50487 )



Change subject: tests: [WIP] Add KVM CPU switch tests
..

tests: [WIP] Add KVM CPU switch tests

WIP, not yet complete

Change-Id: Ief5d09084a88726fc3944e0c56f3a61a5d04ec1b
---
A tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py
1 file changed, 146 insertions(+), 0 deletions(-)



diff --git a/tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py  
b/tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py

new file mode 100644
index 000..78008f8
--- /dev/null
+++ b/tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py
@@ -0,0 +1,146 @@
+# Copyright (c) 2021 The Regents of the University of California
+# 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.
+
+"""
+The purpose of this Suite of tests is to check the gem5.components  
switchable

+processor is functioning as intended; allowing switching from KVM to a more
+detailed processor.
+"""
+
+import os
+
+from testlib import *
+
+if config.bin_path:
+resource_path = config.bin_path
+else:
+resource_path = joinpath(absdirpath(__file__), "..", "resources")
+
+
+def test_kvm_switch(cpu: str, num_cpus: int, mem_system: str, length: str):
+
+if not os.access("/dev/kvm", mode=os.R_OK | os.W_OK):
+# Don't run the tests if KVM is unavailable.
+return
+
+name = "{}-cpu_{}-cores_{}_kvm-switch-test".format(
+cpu, str(num_cpus), mem_system
+)
+verifiers = []
+
+if mem_system == "mesi_two_level":
+protocol_to_use = "MESI_Two_Level"
+isa_to_use = constants.x86_tag
+elif mem_system == "mi_example":
+protocol_to_use = None
+isa_to_use = constants.x86_tag
+else:
+protocol_to_use = None
+isa_to_use = constants.gcn3_x86_tag
+
+gem5_verify_config(
+name=name,
+verifiers=verifiers,
+fixtures=(),
+config=joinpath(
+config.base_dir,
+"tests",
+"gem5",
+"configs",
+"boot_kvm_switch_exit.py",
+),
+config_args=[
+"--cpu",
+cpu,
+"--num-cpus",
+str(num_cpus),
+"--mem-system",
+mem_system,
+"--override-download",
+"--resource-directory",
+resource_path,
+"--kernel-args=''",
+],
+valid_isas=(isa_to_use,),
+valid_hosts=constants.supported_hosts,
+protocol=protocol_to_use,
+length=length,
+)
+
+
+ The quick (pre-submit/Kokoro) tests 
+
+test_kvm_switch(
+cpu="atomic", num_cpus=1, mem_system="classic",  
length=constants.quick_tag

+)
+test_kvm_switch(
+cpu="classic", num_cpus=1, mem_system="classic",  
length=constants.quick_tag

+)
+test_kvm_switch(
+cpu="timing", num_cpus=1, mem_system="classic",  
length=constants.quick_tag

+)
+test_kvm_switch(
+cpu="atomic",
+num_cpus=1,
+mem_system="mi_example",
+length=constants.quick_tag,
+)
+test_kvm_switch(
+cpu="classic", num_cpus=4, mem_system="classic",  
length=constants.quick_tag

+)
+test_kvm_switch(
+cpu="timing",
+num_cpus=4,
+mem_system="mi_example",
+length=constants.quick_tag,
+)
+
+### The long (nightly) tests 
+
+test_kvm_switch(
+cpu="atomic",
+num_cpus=1,
+mem_system="mesi_two_level",
+length=constants.long_tag,
+)
+test_kvm_switch(
+cpu="classic",
+num_cpus=1,
+ 

  1   2   3   4   5   6   >