Commit Graph

21521 Commits

Author SHA1 Message Date
Harshil Patel
5658eec958 tests: update mocking for tests
- After removal of the ClientWrapper class, the mocking of clients needs
  to be changed to _create_client function.
- Commented failing tests due to persistence issues.
  The persistence is being caused as the new mocked clients
  not being used as the older clients are persisting over
  the tests.

Change-Id: Ie342c9fc8103504dd12f49ae30b3bf62d189ce1d
2024-04-23 16:26:44 -07:00
Harshil Patel
d548f2c5c4 tests: fix tests that use JSON client
- There was a bug in JSONClient when searching
  for resoruces. The id was not checked and
  the booleans were not set to true when
  optional search queries like resource_version
  and gem5_version are not passed.

Change-Id: I4aa7c5388035144ec6864d57130ad09e6709692e
2024-04-23 16:24:09 -07:00
Harshil Patel
97a0530452 stdlib: Enable bundled resource requests from the databases (#779) 2024-04-22 11:53:23 -07:00
Bobby R. Bruce
40fdf368d8 util: Enable m5term Apple Mac OS Compilation (#1046)
The "linux/limits.h" equivalent on Apple systems is "sys/syslimits.h".
By adding an include guard to include the correct header dependent on
the host system, we can compile m5term on Mac OS systems.
2024-04-22 11:31:16 -07:00
Bobby R. Bruce
dd2689905f misc,tests: Remove zip step from Workflows (#1048)
This is not needed with upload-artifact v4 directories are archived and
compressed by default.

This zip step was also causing Daily/Weekly test failures due to not
running `apt update` before the `apt install` for the zip utility. Ergo
this patch fixes these errors.
2024-04-21 09:15:20 -07:00
Matthew Poremba
c54039da5b configs: GPUFS: Turn off SSE4 and fancy XSAVEs (#1041)
A user reported a bug with the SSE4.1 version of memcmp in libc. When
enabled the simulated program crashes with SIGILL. After attempting all
fixes recommended by Intel SDM and still not working, turning the bit
off instead.

Similar, the default XSAVE functionality is not completely implemented
for AVX and newer ISA extensions. Therefore, there is not much point to
claiming to support the more advanced versions of XSAVE (XSAVEOPT,
XSAVEC, XSAVES, and XGETBV with ECX=1).

Note that none of these bits are enabled for non-GPU full system
simulations (see src/arch/x86/X86ISA.py). This only impacts GPUFS
simulations.

Change-Id: I8eb7bf0f2a0a29226095e7889fec9c1e8a65f88f
2024-04-20 11:04:59 -07:00
Bobby R. Bruce
e578f83739 github,tests: Add Pyunit tests to CI GitHub Action Workflow (#1026)
Due to an oversight, the PyUnit tests were not being run as part of the
gem5 CI tests. This was because they are located in "tests/pyunit"
instead of "tests/gem5", where the CI GitHub Action workflow searched
for tests to run and where all other tests reside.

This adds the Pyunit tests as a seperate job in the CI GitHub Action's
workflow.
2024-04-19 15:22:04 -07:00
Bobby R. Bruce
13f85b989f stdlib: Fix obtaining of Simpoint Resources
Change-Id: Ic73547c8c4acbe5d8a30a24dd8709cb2e9f6eb5e
2024-04-19 01:54:42 -07:00
Bobby R. Bruce
52a7218bd8 stdlib,tests: Fix test resources entry for to new schema
Change-Id: I77c263315d3e7f15df6f7fd83ab4ad9280faf777
2024-04-18 17:33:30 -07:00
Bobby R. Bruce
b80a04e146 stdlib,tests: Fix mocked_resquest_post - add kwargs
Change-Id: I1c080d42b6f238d2f716c500913dc7576dc13ed6
2024-04-18 17:33:30 -07:00
Bobby R. Bruce
e4ff5df35a tests,stdlib: Fix pyunit tests - Workload -> ShadowResource
Change-Id: I307439334c93851ebe3a78d3a80d048374a0900a
2024-04-18 17:33:30 -07:00
Bobby R. Bruce
29d56d3d65 misc,tests: Add Pyunit tests to CI GitHub Action Workflow
Due to an oversight, the PyUnit tests were not being run as part of the
gem5 CI tests. This was because they are located in "tests/pyunit"
instead of "tests/gem5", where the CI GitHub Action workflow searched
for tests to run and where all other tests reside.

This adds the Pyunit tests as a seperate job in the CI GitHub Action's
workflow.

Change-Id: I63d93571fde11c19bf3d281c034eddf4b455ae4e
2024-04-18 17:33:30 -07:00
Bobby R. Bruce
cbf0334762 misc: Fix jq install for testlib-quick-matrix (#1038) 2024-04-18 17:30:53 -07:00
Ivana Mitrovic
42ffa52907 mem-ruby: Implement no_alloc Far Atomics in CHI (#994)
This PR introduces a missing pice of far atomic implementation. This
pull request incorporates several changes:

- Enable 2-level and 4-level (and N-level) cache hierarchies, removing
Atomic_NoWait transactions
- Fix Unique Near policy implementation that raised abort
- Add support for alloc_on_atomic == False. Enables Far Atomics on
systems where the HNF does not allocate evicted lines at LLC (Like in
WriteUpdate).
2024-04-18 11:35:47 -07:00
Ivana Mitrovic
c44b8635ab arch-x86: Movfp account for dataSize=4 (#1024)
Movfp instruction did not account for only copying the lower half of src
register if dataSize is 4.
GitHub Issue: #893 
I used the test code in issue #893 to verify the fix is working.
2024-04-18 10:36:00 -07:00
Bartek Gąsiorzewski
84cba2a8a8 dev: Fix interrupt logic in uart8250 (#1009)
Hi, we've noticed some issues with the Uart8250 device when using it as
the Linux console. Sometimes the Uart interrupt would remain constantly
posted, so Linux would continue to try and handle it, effectively
resulting in an infinite loop. With this patch, I'm no longer seeing any
issues, but my testing has been limited to configurations and workloads
we're interested in at Imagination, so please let me know if there's
some other tests I should run or if you notice any other issues.

This patch fixes several issues with interrupt posting and clearing in
the uart8250 device.

The "status" member variable and the console interrupt should be kept in
sync. However, in one code path in readIir, the interrupt bit was being
cleared in the status variable but not in the platform controller.

Additionally, in some code paths, the interrupts would be cleared in the
status variable and in the interrupt controller, but a future interrupt
would remain scheduled, causing a spurious interrupt and setting a bit
in status to 1.

These issues can confuse the kernel and result in an ininite interrupt
handling loop.

Another issue is related to the fact that there are two interrupt causes
(TX and RX) and both of them can be valid at the same time. When one of
them becomes no longer valid, we should check the status of the other
one before clearing the interrupt.

This patch addresses the issues listed above and refactors the interrupt
clearing logic to reduce repetition.
2024-04-17 11:27:39 -07:00
Jason Lowe-Power
c13aa7727d cpu: Fix Ruby/x86 pio port connections (#1035)
Fixes #1033

In the BaseCPU object _uncached_interrupt_response_ports is a class
variable, not an instance variable. #1004 changed the explicit
self._uncached_interrupt_response_ports to use extend. This caused the
list of ports to be extended *for all cores*, which caused problems when
using a system with more than 1 core.

This reverts the `extend` part of the change, but keeps the rest.

Change-Id: I6dc7d6da6763048d82960229d34933a3a2ac36e0

Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
2024-04-17 08:20:04 -07:00
Yu-Cheng Chang
6b4dbdcedb tests,arch-riscv: update bitmanip asmtest binaries (#931)
Gem5 resource update: https://github.com/gem5/gem5-resources/pull/25
Gem5 issue: https://github.com/gem5/gem5/issues/883

Change-Id: I1892d7591d6fa49d0563623fd90292e0d38d9ba3
2024-04-16 09:51:32 -07:00
Lukas Zenick
01a5edc86e arch-x86: Use mbits function for clarity
Change-Id: I577ee55752f917e561e4c741ba7a19f0229318b5
2024-04-15 22:49:41 -05:00
Matthew Poremba
9b463dbdfd util-docker: Bump gpu-fs build docker to ROCm 6.0.2 (#1025)
This bumps the docker image used to build GPU applications for input to
GPUFS simulations from ROCm 5.4.2 to ROCm 6.0.2 and Ubuntu from 20.04 to
22.04. This matches the versions in gem5-resources#29 .

Several notes were added to the Dockerfile to describe where the RUN
commands come from. A README.md is also added to clarify that this is
not a disk image for GPUFS and is only used to build applications.

Change-Id: I9ada99e2ed1854cb7adb76f2a1fa662bab398f86
2024-04-15 13:36:06 -07:00
Bobby R. Bruce
1aa0bf8ec6 tests,github: Update CI Tests' GitHub Actions versions (#1021) 2024-04-15 13:35:33 -07:00
Bobby R. Bruce
56a2346b8d tests,util-docker,github: Add Ubuntu 24.04 Docker image & updated tests/actions to use it (#1018)
This ensures gem5 compiles and runs in 24.04 environments. A necessary
PR, for ensuring gem5 support Ubuntu 24.04 (related issue: #909)
2024-04-15 13:34:22 -07:00
Matthew Poremba
a03319bef7 arch-vega: Fix output warnings, gem5.fast (#1023)
Fix gem5.fast build not building when using gpu model.

Removes very spammy stat distribution bucket size prints when running
gpu model.
2024-04-15 13:18:27 -07:00
Matthew Poremba
7e2d8dee42 mem,gpu-compute: Implement GPU TCC directed invalidate (#1011)
The GPU device currently supports large BAR which means that the driver
can write directly to GPU memory over the PCI bus without using SDMA or
PM4 packets. The gem5 PCI interface only provides an atomic interface
for BAR reads/writes, which means the values cannot go through timing
mode Ruby caches. This causes bugs as the TCC cache is allowed to keep
clean data between kernels for performance reasons. If there is a BAR
write directly to memory bypassing the cache, the value in the cache is
stale and must be invalidated.

In this commit a TCC invalidate is generated for all writes over PCI
that go directly to GPU memory. This will also invalidate TCP along the
way if necessary. This currently relies on the driver synchonization
which only allows BAR writes in between kernels. Therefore, the cache
should only be in I or V state.

To handle a race condition between invalidates and launching the next
kernel, the invalidates return a response and the GPU command processor
will wait for all TCC invalidates to be complete before launching the
next kernel.

This fixes issues with stale data in nanoGPT and possibly PENNANT.
2024-04-15 13:18:01 -07:00
Bobby R. Bruce
630f3822b8 github: Update 'ubuntu-22.04' to 'ubuntu-latest' (#1022)
There was some inconsistency in the GitHub Workflow files on using
'ubuntu-latest' (which gets the latest Ubuntu version) or
'ubuntu-22.04'. To keep things consistent 'ubuntu-latest' is now used in
all cases. This also saves us updating workloads upon release of a new
Ubuntu version.
2024-04-15 09:55:56 -07:00
Giacomo Travaglini
bdcffdd0f0 dev-arm: Do not mark the MpamMSC as abstract (#1030)
This prevents its instantiation


Change-Id: I775a64904a01cf36e4cc1e0cd45765f03325c5ca

Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2024-04-15 09:40:22 -07:00
Bobby R. Bruce
a7330ac4fb misc: bump dnspython in /util/gem5-resource-manager (#1027)
Bumps [dnspython](https://github.com/rthalley/dnspython) from 2.3.0 to
2.6.1.
- [Release notes](https://github.com/rthalley/dnspython/releases)
-
[Changelog](https://github.com/rthalley/dnspython/blob/main/doc/whatsnew.rst)
-
[Commits](https://github.com/rthalley/dnspython/compare/v2.3.0...v2.6.1)

Change-Id: Iaa0ed0fa68220fd8b52eb62c0089831b253e17d0

---
updated-dependencies:
- dependency-name: dnspython dependency-type: direct:production ...

Change-Id: I6e3ed8287f5fd60e7bd1c0a3e565db94ef8627a9

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-15 08:41:14 -07:00
Ivana Mitrovic
dbb71948ce util: Update resource manager dependencies (#1015)
This PR combines the changes from these dependabot PRs: #1008 and #1012.
2024-04-15 08:35:47 -07:00
Lukas Zenick
d67a7797d2 arch-x86: Movfp account for dataSize=4
Change-Id: I97e7a6f2738a57cad9907ddfe5c8030a26c147e8
2024-04-14 15:59:24 -05:00
Matthew Poremba
3db6e86fea arch-vega: Fix string check warnings on fast build
gem5.fast does not currently build if the GPU model is built. This fixes
the array-bounds warnings allowing gem5.fast to build again.

Change-Id: I463c2847c3ecfd2257a70418fa247090b0493f9b
2024-04-14 12:22:57 -07:00
Bobby R. Bruce
b986c542ca tests,misc: Set pre-commit/action to v3.0.1
v3.0.0 of pre-commit/action caused a deprecation warning in actions.
v3.0.1 was released to deal with this.

Change-Id: Ib5654e465565ad4356754ac097983aec4166b98f
2024-04-13 20:30:34 -07:00
Bobby R. Bruce
3f45a2d08d misc,tests: Up actions/setup-python version to v5
This was causing a deprecation warning in GitHub Actions.

Change-Id: I9ab147acf12e3763ab731769468ce5b1dc5e4dea
2024-04-13 20:20:26 -07:00
Matthew Poremba
01f2df4b8a gpu-compute: Fix stat bucket sizes
Change-Id: If30505515867a866c631cb117d3d22e19814a2f2
2024-04-13 15:51:41 -07:00
Bobby R. Bruce
ccd9beb661 util-docker: Remove 22.04 min-dep Dockerfile
We only test the latest LTS Ubuntu release with min-deps. With 24.04, we
no longer require the 22.04 min dependencies image.

Change-Id: I4b3d668c1f9d10c2b6071848e6daada6c763b5e7
2024-04-13 14:16:41 -07:00
Bobby R. Bruce
05bc85aa9b misc: Update Update GitHub Actions to use 24.04 over 22.04
This change ensures all our tests run on our most recent supported LTS
release of Ubuntu.

In the case of compiler tests we still test 22.04 all-dep but test 24.04
all-dep and min-dep (i.e., we drop 22.04 min-dep as it's somewhat
redundant).

Change-Id: I63666d1017594b496523a48e5112a8994f57885f
2024-04-13 14:13:35 -07:00
Bobby R. Bruce
d091c64db1 util-docker: Add Ubuntu 24.04 min-dep Docker
Change-Id: Ia5cb4f2fd54ce53494ab95705b4f6006648d7eba
2024-04-13 14:08:13 -07:00
Bobby R. Bruce
3962fca2e3 util-docker: Add ubuntu-24.04_all-deps Docker
Change-Id: I5917c446cacc25d1a333b5cf8147ee78b112aeb3
2024-04-13 14:08:13 -07:00
Bobby R. Bruce
bdaeb082c3 util-docker: Update docker-compose URLs to 'ghcr.io/gem5' (#1017)
'gcr.io/test-gem5' was the registry we used when hosting them on Google
Cloud services. We now use the GitHub container registries.
2024-04-13 14:05:34 -07:00
Bobby R. Bruce
392a2b4ffa misc: Add a DevContainer specification to the gem5 repo (#911)
Speciftying a DevContainer in gem5 allows for users to quickly create an
environment in which they can develop, build, and run gem5. The
".devcontainer/devcontainer.json" file specifies the properties of the
container. In this commit they are as follows:

1. The Docker image ghcr.io/gem5/devcontainer. This is built from
"util/dockerfiles/devcontainer". This Dockerfile provides all
dependencies and a pre-built gem5 binary from the current main branch
(added to "/usr/local/bin"). In order to support this Docker container
on different platforms we use the Docker multi-platform feature. As
such, this must be built using `docker buildx bake devcontainer --push`
which reads the `docker-bake.hcl file for the specification of the
multi-platform image.
2. Visual Studio extensions. This is a list of Visual Studio Code
extensions useful when developing gem5. They are automatically added the
Visual Studio dev container.
3. Features. Features are enhancemets that can be added to a
DevContainer. Normally they are libraries and other commonly used tools
to be included in the Container. As we have our dependencies specified
in the Dockerfile here we select one to enable Docker inside the
container, one to enable the Github CLI, one to improve Linting, and
finally one to enable the vscode CLI.
4. The On Create Command : This command allows us to specify commands to
be run after the DevContainer is created. In this case we execute
".devcontainer/on-create.sh" which, right now, refreshes the git index
and installed the pre-commit checks.
2024-04-12 10:37:17 -07:00
Yu-Cheng Chang
ebb70dea99 cpu: Fix KVM false negative warning after Kconfig transition (#1013)
When we start to build gem5. We will read and process all of SConsopts
files, and process the after_sconsopts_callbacks after all of SConsopts
files read.

In the KVM_ISA env setting, the KVM_ISA env can be set in the different
files, take x86 and arm as example:

KVM_ISA default value:

bc39283451/src/cpu/kvm/SConsopts

x86 KVM_ISA:

bc39283451/src/arch/x86/kvm/SConsopts (L39-L45)

arm KVM_ISA:

bc39283451/src/arch/arm/kvm/SConsopts (L35-L36)

We should move the kvm warning after all of SConsopts env read

issue: https://github.com/gem5/gem5/issues/686

Change-Id: I096c6bebaaec18f9b2af93191d0dd23c65084eda
2024-04-12 09:23:56 -07:00
Nicholas Mosier
bc39283451 cpu-o3, arch-x86: initialize interrupts for all SMT threads (#1007)
Fix issue #1004. When enabling SMT with the O3 cpu, only the first
interrupts object was getting initialized properly. This patch
initializes all interrupts objects, one per SMT thread.

Change-Id: I300782b645bd8ea3ef2497278fb73125ab4bf495
2024-04-11 11:17:24 -07:00
Ivana Mitrovic
db1c336237 cpu,arch-arm,arch-riscv: adding new instruction types to RISC-V (#589)
This commit adds more detailed instruction types for RISC-V Vector.
Concretely, it substitutes VectorIntegerArith, VectorFloatArith,
VectorIntegerReduce and VectorFloatReduce with more specific types
related to the operation that each instruction (e.g., VectorIntegerAdd
or VectorIntegerMult).

Additionaly, fixes two RISC-V instruction types (VectorXXX) that were
used in ARM SVE, placing the proper SimdXXX ones.

Change-Id: I31774fa6a7cd249abfffec68d11d3d77f08ad70b

CC @adriaarmejach
2024-04-11 10:15:56 -07:00
Giacomo Travaglini
3b5ae7b4d1 Add a generic cache template library (#745)
Add a generic cache template to construct internal storage structures.
Also add some example use cases by converting the prefetcher tables to
use this new library.
2024-04-11 08:00:34 +01:00
Pranith Kumar
769f750eb9 mem-cache: Implement AssociativeSet from AssociativeCache
AssociativeSet can reuse most of the generic cache library code with the
addition of a secure bit. This reduces duplicated code.

Change-Id: I008ef79b0dd5f95418a3fb79396aeb0a6c601784
2024-04-10 16:17:57 -04:00
Pranith Kumar
f3bc10c168 mem-cache: Derive tagged entry from cache entry
The tagged entry can be derived from the generic cache entry and add the secure
flag that it needs. This reduces code duplication.

Change-Id: I7ff0bddc40604a8a789036a6300eabda40339a0f
2024-04-10 16:17:57 -04:00
Pranith Kumar
8fb3611614 mem-cache: prefetch: Implement DCPT tables using cache library
The DCPT table is better built using the generic cache library since we do not
need the secure bit.

Change-Id: I8a4a8d3dab7fbc3bbc816107492978ac7f3f5934
2024-04-10 16:17:57 -04:00
Pranith Kumar
2c7d4bed66 mem-cache: Implement VFT tables using cache library
The frequency table is better built using the generic cache library instead of the
AssociativeSet since the secure bit is not needed for this structure.

Change-Id: Ie3b6442235daec7b350c608ad1380bed58f5ccf4
2024-04-10 16:17:57 -04:00
Pranith Kumar
2cc2ad5097 misc: Add a generic cache library
Add a generic cache library modeled after AssociativeSet that can be used for
constructing internal caching structures.

Change-Id: I1767309ed01f52672b32810636a09142ff23242f
2024-04-10 16:17:57 -04:00
Giacomo Travaglini
4b98551aaf Update src/python/gem5/components/cachehierarchies/abstract_cache_hierarchy.py
Co-authored-by: Bobby R. Bruce <bbruce@ucdavis.edu>
2024-04-10 16:17:56 -04:00
Giacomo Travaglini
efe397ca92 stdlib: Add DTB generation capabilites to AbstractCacheHierarchy
Now that we are able to provide a view of the cache hierarchy from
the python world, we can start generating DTB entries for caches
and more specifically to properly fill the next-level-cache and
cache-level properties

Change-Id: Iba9ea08fe605f77a353c9e64d62b04b80478b4e2
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2024-04-10 16:17:56 -04:00