[gem5-dev] Change in gem5/gem5[develop]: arch-x86, kvm: clean up x86 long regresion kvm code

2020-11-07 Thread mike upton (Gerrit) via gem5-dev
mike upton has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/37120 )


Change subject: arch-x86, kvm: clean up x86 long regresion kvm code
..

arch-x86, kvm: clean up x86 long regresion kvm code

This commit cleans up the code for x86 kvm long regressions.
Somehow the old version went is as the last patchset.
This is the intended code, which should match the last comments.

Change-Id: I9af02a51ce8ed5098887fb0a6b9240db95227bc3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/37120
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M tests/gem5/x86-boot-tests/test_linux_boot.py
1 file changed, 1 insertion(+), 3 deletions(-)

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



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

index 94b6e7e..3140595 100644
--- a/tests/gem5/x86-boot-tests/test_linux_boot.py
+++ b/tests/gem5/x86-boot-tests/test_linux_boot.py
@@ -25,9 +25,7 @@
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 import os
-import subprocess
 from testlib import *
-import platform


 if config.bin_path:
@@ -76,6 +74,6 @@
 test_boot('atomic', '4', 'systemd', constants.supported_hosts)

 #KVM
-if(support_kvm() and (platform.machine() == constants.host_x86_64_tag)):
+if(support_kvm()):
 test_boot('kvm', '1', 'init', (constants.host_x86_64_tag,))
 test_boot('kvm', '4', 'systemd', (constants.host_x86_64_tag,))

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/37120
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: I9af02a51ce8ed5098887fb0a6b9240db95227bc3
Gerrit-Change-Number: 37120
Gerrit-PatchSet: 2
Gerrit-Owner: mike upton 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Giacomo Travaglini 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
Gerrit-Reviewer: mike upton 
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: Use MAINTAINERS.yaml for valid tags in git hook

2020-11-07 Thread Matthew Poremba (Gerrit) via gem5-dev
Matthew Poremba has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/37220 )



Change subject: util: Use MAINTAINERS.yaml for valid tags in git hook
..

util: Use MAINTAINERS.yaml for valid tags in git hook

There is a mismatch between the tags in MAINTAINERS.yaml and the
valid_tags in the git hook. This means if a user consults the
MAINTAINERS.yaml file to find the appropriate tag, there is a chance of
the commit being rejected due to this mismatch. Now that the maintainers
file is in yaml format, use that to parse the valid tag options. Some
additional special tags are added (WIP, RFC) and tags that were
previously valid but not in the MAINTAINERS.yaml file.

Change-Id: I3de8f0b6f8507aa1afd2118bc4373ac0610cce40
---
M util/git-commit-msg.py
1 file changed, 8 insertions(+), 12 deletions(-)



diff --git a/util/git-commit-msg.py b/util/git-commit-msg.py
index 9cba896..de23691 100755
--- a/util/git-commit-msg.py
+++ b/util/git-commit-msg.py
@@ -32,6 +32,7 @@
 import os
 import re
 import sys
+import yaml

 from style.repo import GitRepo

@@ -57,8 +58,8 @@

 print("""
 The first line of a commit must contain one or more gem5 tags separated by
-commas (see MAINTAINERS for the possible tags), followed by a colon and a
-commit title. There must be no leading nor trailing whitespaces.
+commas (see MAINTAINERS.yaml for the possible tags), followed by a colon  
and

+a commit title. There must be no leading nor trailing whitespaces.

 This header line must then be followed by an empty line. A detailed  
message,
 although highly recommended, is not mandatory and can follow that empty  
line.

@@ -85,17 +86,12 @@
 """

 # List of valid tags
-# @todo this is error prone, and should be extracted automatically from
-#   a file
+with open(r'MAINTAINERS.yaml') as maint_file:
+valid_tags = [key for key in yaml.load(maint_file)]

-valid_tags = ["arch", "arch-arm", "arch-gcn3",
-"arch-mips", "arch-power", "arch-riscv", "arch-sparc", "arch-x86",
-"base", "configs", "cpu", "cpu-kvm", "cpu-minor", "cpu-o3",
-"cpu-simple", "dev", "dev-arm", "dev-hsa", "dev-virtio", "ext",
-"fastmodel", "gpu-compute", "learning-gem5", "mem", "mem-cache",
-"mem-garnet", "mem-ruby", "misc", "python", "scons", "sim", "sim-se",
-"sim-power", "stats", "system", "system-arm", "systemc", "tests",
-"util", "RFC", "WIP"]
+# Remove non-tag 'pmc' and add special tags not in MAINTAINERS.yaml
+valid_tags.remove('pmc')
+valid_tags.extend(['RFC', 'WIP', 'stats', 'sim-power'])

 tags = ''.join(commit_header.split(':')[0].split()).split(',')
 if (any(tag not in valid_tags for tag in tags)):

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/37220
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: I3de8f0b6f8507aa1afd2118bc4373ac0610cce40
Gerrit-Change-Number: 37220
Gerrit-PatchSet: 1
Gerrit-Owner: Matthew Poremba 
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: Update python version for GCN3

2020-11-07 Thread Matthew Poremba (Gerrit) via gem5-dev
Matthew Poremba has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/37219 )



Change subject: util: Update python version for GCN3
..

util: Update python version for GCN3

The Python version installed in the Dockerfile for GCN3 by apt-get is
too old to build gem5. This bumps the version to the most recent Python
to avoid needing to update this file too much.

Python 3.9 is install via PPA since it is not available in the official
Ubuntu 16.04 repository. Likewise, pip is installed from "source" as it
is not available for Python 3.9 in from neither the PPA nor Ubuntu.

Change-Id: Ia919f31cf9c9063e1df091cea15590526715739b
---
M util/dockerfiles/gcn-gpu/Dockerfile
1 file changed, 20 insertions(+), 7 deletions(-)



diff --git a/util/dockerfiles/gcn-gpu/Dockerfile  
b/util/dockerfiles/gcn-gpu/Dockerfile

index 19f3ad7..e13367f 100644
--- a/util/dockerfiles/gcn-gpu/Dockerfile
+++ b/util/dockerfiles/gcn-gpu/Dockerfile
@@ -1,5 +1,12 @@
 FROM ubuntu:16.04

+# Needed for add-apt-repository
+RUN apt-get update && apt-get install -y --no-install-recommends \
+software-properties-common
+
+# Ubuntu 16.04 does not have a python package new enough for gem5, use a  
PPA

+RUN add-apt-repository ppa:deadsnakes/ppa && apt-get update
+
 # Should be minimal needed packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
 findutils \
@@ -20,11 +27,9 @@
 libprotoc-dev \
 libgoogle-perftools-dev \
 python-yaml \
-python3-dev \
-python3 \
-python3-yaml \
-python3-six \
-python3-pip \
+python3.9 \
+python3.9-dev \
+python3.9-distutils \
 wget \
 libpci3 \
 libelf1 \
@@ -37,8 +42,14 @@
 libboost-dev \
 libpng12-dev

-RUN python3 -m pip install -U pip && \
-python3 -m pip install -U setuptools scons==3.1.2
+# Use python 3.9 by default
+RUN update-alternatives --install /usr/bin/python3 python3  
/usr/bin/python3.9 1

+
+# Setuptools is needed for cmake for ROCm build. Install using pip.
+# Instructions to install PIP from https://pypi.org/project/pip/
+RUN wget https://bootstrap.pypa.io/get-pip.py -qO get-pip.py
+RUN python3 get-pip.py
+RUN pip install -U setuptools scons==3.1.2 six

 ARG gem5_dist=http://dist.gem5.org/dist/develop

@@ -152,5 +163,7 @@
 WORKDIR /ROCm-Profiler
 RUN dpkg -i package/rocm-profiler_4.0.6036_amd64.deb

+# Always use python3 and create a link to config command for gem5 to find
 RUN ln -sf /usr/bin/python3 /usr/bin/python
+RUN ln -sf /usr/bin/python3.9-config /usr/bin/python3-config
 WORKDIR /

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/37219
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: Ia919f31cf9c9063e1df091cea15590526715739b
Gerrit-Change-Number: 37219
Gerrit-PatchSet: 1
Gerrit-Owner: Matthew Poremba 
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: Fix how directories are handled for protobuf files.

2020-11-07 Thread Gabe Black (Gerrit) via gem5-dev

Attention is currently required from: Gabe Black.
Hello Gabe Black,

I'd like you to do a code review. Please visit

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

to review the following change.


Change subject: scons: Fix how directories are handled for protobuf files.
..

scons: Fix how directories are handled for protobuf files.

There were two issues with how paths were handled for these files.

1. The code in the ProtoBuf class would drop the subdirectory part of
the path name when generating the name of the .cc and .h files the
protoc compiler would output. Since protoc wouldn't generate files
where scons expected, it would fail when it tried to build the .cc.

2. protoc will use the --proto_path and --cpp_out settings to figure
out what path to use for generated files. It will remove the
--proto_path prefix it found the .proto file with from the files path,
and then add the rest to the --cpp_out prefix.

The input files should come from the build directory using symlinks
set up by scons, and the output files should end up alongside them.
That means the --proto_path setting should be the build directory, and
so should --cpp_out. That's fortunately simpler than what was there
before, since it doesn't depend on what the source or targets are.

Change-Id: I69692d2fe3813011982f0c1c9824589a132f93ed
---
M src/SConscript
1 file changed, 4 insertions(+), 4 deletions(-)



diff --git a/src/SConscript b/src/SConscript
index 9f82bdc..50bf072 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -399,8 +399,8 @@

 # Currently, we stick to generating the C++ headers, so we
 # only need to track the source and header.
-self.cc_file = File(modname + '.pb.cc')
-self.hh_file = File(modname + '.pb.h')
+self.cc_file = self.tnode.dir.File(modname + '.pb.cc')
+self.hh_file = self.tnode.dir.File(modname + '.pb.h')


 exectuable_classes = []
@@ -1024,8 +1024,8 @@
 # specify the proto_path to avoid having the generated files
 # include the path.
 env.Command([proto.cc_file, proto.hh_file], proto.tnode,
-MakeAction('${PROTOC} --cpp_out ${TARGET.dir} '
-   '--proto_path ${SOURCE.dir} $SOURCE',
+MakeAction('${PROTOC} --cpp_out ${BUILDDIR} '
+   '--proto_path ${BUILDDIR} $SOURCE',
Transform("PROTOC")))

 # Add the C++ source file

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/37218
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: I69692d2fe3813011982f0c1c9824589a132f93ed
Gerrit-Change-Number: 37218
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Gabe Black 
Gerrit-Attention: Gabe Black 
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]: fastmodel: Wrap the PL330 DMA controller fast model.

2020-11-07 Thread Gabe Black (Gerrit) via gem5-dev

Attention is currently required from: Gabe Black.
Hello Gabe Black,

I'd like you to do a code review. Please visit

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

to review the following change.


Change subject: fastmodel: Wrap the PL330 DMA controller fast model.
..

fastmodel: Wrap the PL330 DMA controller fast model.

Change-Id: I0290e52ede4dca1252ca224abcc85c2c8086ea3c
---
A src/arch/arm/fastmodel/PL330_DMAC/FastModelPL330.py
A src/arch/arm/fastmodel/PL330_DMAC/PL330.lisa
A src/arch/arm/fastmodel/PL330_DMAC/PL330.sgproj
A src/arch/arm/fastmodel/PL330_DMAC/SConscript
A src/arch/arm/fastmodel/PL330_DMAC/pl330.cc
A src/arch/arm/fastmodel/PL330_DMAC/pl330.hh
6 files changed, 675 insertions(+), 0 deletions(-)



diff --git a/src/arch/arm/fastmodel/PL330_DMAC/FastModelPL330.py  
b/src/arch/arm/fastmodel/PL330_DMAC/FastModelPL330.py

new file mode 100644
index 000..5116006
--- /dev/null
+++ b/src/arch/arm/fastmodel/PL330_DMAC/FastModelPL330.py
@@ -0,0 +1,170 @@
+# Copyright 2020 Google, Inc.
+#
+# 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 m5.params import *
+from m5.objects.FastModel import AmbaInitiatorSocket, AmbaTargetSocket
+from m5.objects.IntPin import IntSourcePin
+from m5.objects.SystemC import SystemC_ScModule
+
+class FastModelPL330(SystemC_ScModule):
+type = 'FastModelPL330'
+cxx_class = 'FastModel::PL330'
+cxx_header = 'arch/arm/fastmodel/PL330_DMAC/pl330.hh'
+
+clock = Param.Frequency("Clock frequency")
+
+irq_0 = IntSourcePin("Sets when DMASEV 0")
+irq_1 = IntSourcePin("Sets when DMASEV 1")
+irq_2 = IntSourcePin("Sets when DMASEV 2")
+irq_3 = IntSourcePin("Sets when DMASEV 3")
+irq_4 = IntSourcePin("Sets when DMASEV 4")
+irq_5 = IntSourcePin("Sets when DMASEV 5")
+irq_6 = IntSourcePin("Sets when DMASEV 6")
+irq_7 = IntSourcePin("Sets when DMASEV 7")
+irq_8 = IntSourcePin("Sets when DMASEV 8")
+irq_9 = IntSourcePin("Sets when DMASEV 9")
+irq_10 = IntSourcePin("Sets when DMASEV 10")
+irq_11 = IntSourcePin("Sets when DMASEV 11")
+irq_12 = IntSourcePin("Sets when DMASEV 12")
+irq_13 = IntSourcePin("Sets when DMASEV 13")
+irq_14 = IntSourcePin("Sets when DMASEV 14")
+irq_15 = IntSourcePin("Sets when DMASEV 15")
+irq_16 = IntSourcePin("Sets when DMASEV 16")
+irq_17 = IntSourcePin("Sets when DMASEV 17")
+irq_18 = IntSourcePin("Sets when DMASEV 18")
+irq_19 = IntSourcePin("Sets when DMASEV 19")
+irq_20 = IntSourcePin("Sets when DMASEV 20")
+irq_21 = IntSourcePin("Sets when DMASEV 21")
+irq_22 = IntSourcePin("Sets when DMASEV 22")
+irq_23 = IntSourcePin("Sets when DMASEV 23")
+irq_24 = IntSourcePin("Sets when DMASEV 24")
+irq_25 = IntSourcePin("Sets when DMASEV 25")
+irq_26 = IntSourcePin("Sets when DMASEV 26")
+irq_27 = IntSourcePin("Sets when DMASEV 27")
+irq_28 = IntSourcePin("Sets when DMASEV 28")
+irq_29 = IntSourcePin("Sets when DMASEV 29")
+irq_30 = IntSourcePin("Sets when DMASEV 30")
+irq_31 = IntSourcePin("Sets when DMASEV 31")
+irq_abort = IntSourcePin("Undefined instruction or instruction error")
+
+fifo_size = Param.UInt32(16, "Channel FIFO size in bytes")
+max_transfer = Param.UInt32(256, "Largest atomic transfer")
+generate_clear = Param.Bool(False, "Generate clear response")
+activate_delay = Param.UInt32(0, "request delay")
+revision = Param.String("r0p0", "revision ID")
+
+max_irqs = Param.UInt32(32, "number of i