diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 71281e457f..d99e7226f3 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -50,9 +50,11 @@ Suites is a new category of resource being introduced in gem5. Documentation of - Update vega10_kvm.py to add checkpointing instructions ## SE mode GPU model improvements + - started adding support for mmap'ing inputs for GPUSE tests, which reduces their runtime by 8-15% per run ## GPU model improvements + - update GPU VIPER and Coalescer support to ensure correct replacement policy behavior when multiple requests from the same CU are concurrently accessing the same line - fix bug with GPU VIPER to resolve a race conflict for loads that bypass the TCP (L1D$) - fix bug with MRU replacement policy updates in GPU SQC (I$) @@ -126,6 +128,32 @@ Jerin Joy who did much of the initial work, and many others who contributed to t - [Bug when trying to restore checkpoints in SPARC: “panic: panic condition !pte occurred: Tried to execute unmapped address 0.”](https://github.com/gem5/gem5/issues/197) - [BaseCache::recvTimingResp can trigger an assertion error from getTarget() due to MSHR in senderState having no targets](https://github.com/gem5/gem5/issues/100) +# Version 23.0.1.0 + +This minor release incorporates documentation updates, bug fixes, and some minor improvements. + +## Documentation updates + +* "TESTING.md" has been updated to more accurately reflect our current testing infrastructure. +* "README" has been replaced with "README.md" and includes more up-to-date information on using gem5. +* "CONTRIBUTING.md" has been updated to reflect our migration to GitHub and the changes in policy and proceedures. +* Where needed old references to Gerrit have been removed in favor of GitHub. + +## Bug Fixes + +* Fixes an assert failure when using ARM which was trigged when `shiftAmt` is 0 for a UQRSH instruction. +* Fixes `name 'fatal' is not defined` being thrown when tracing is off. +* Fixes a bug in ARM in which the TLBIOS instructions were decoded as normal MSR instructions with no effect on the TLBs. +* Fixes invalid `packet_id` value in flit. +* Fixes default CustomMesh for use with Garnet. + +## Minor Improvements + +* The gem5 resources downloader now outputs more helpful errors in the case of a failure. +* "util/github-runners-vagrant" has been added. This outlines how to setup a GitHub Action's set-hosted runner for gem5. +* The PyUnit tests have been refactored to no longer download large resources during testing. +* Using Perf is now optional when utilizing KVM CPUs. + # Version 23.0.0.1 **[HOTFIX]** Fixes compilation of `GCN3_X86` and `VEGA_X85`. diff --git a/src/arch/riscv/isa/decoder.isa b/src/arch/riscv/isa/decoder.isa index be4b621a37..d4836070ac 100644 --- a/src/arch/riscv/isa/decoder.isa +++ b/src/arch/riscv/isa/decoder.isa @@ -389,10 +389,8 @@ decode QUADRANT default Unknown::unknown() { if (status.fs == FPUStatus::OFF) return std::make_shared("FPU is off", machInst); - status.fs = FPUStatus::DIRTY; xc->setMiscReg(MISCREG_STATUS, status); - Fc1_bits = Mem; }}, {{ EA = rvZext(sp + offset); @@ -420,10 +418,8 @@ decode QUADRANT default Unknown::unknown() { if (status.fs == FPUStatus::OFF) return std::make_shared("FPU is off", machInst); - status.fs = FPUStatus::DIRTY; xc->setMiscReg(MISCREG_STATUS, status); - freg_t fd; fd = freg(f32(Mem_uw)); Fd_bits = fd.v; diff --git a/src/mem/port.hh b/src/mem/port.hh index 5f977aaab8..2b5ed1d5d2 100644 --- a/src/mem/port.hh +++ b/src/mem/port.hh @@ -47,7 +47,6 @@ #define __MEM_PORT_HH__ #include -#include #include #include diff --git a/util/github-runners-vagrant/README.md b/util/github-runners-vagrant/README.md index ca504e3c63..efa8d44d93 100644 --- a/util/github-runners-vagrant/README.md +++ b/util/github-runners-vagrant/README.md @@ -67,26 +67,6 @@ You can check the status of the runner here: https://github.com/organizations/{G If the runner ever shows as offline, you can rerun the `vagrant up --provider=libvirt` command to make sure everything is working properly. -## Troubleshooting - -### The default libvirt disk image storage pool is on the wrong drive - -By default libvirt will store disk images in "/var/lib/libvirt/images". -This is not ideal as it is on a small root partition. -A solution to this is to change the default storage location. -To do so, do the following: - -```sh -virsh pool-list --all # Confirm here a "default" pool exist. We'll modify this. -virsh pool-dumpxml default >default-pool.xml # We take a dump of the default then removed it. -virsh pool-destroy default -virsh pool-undefine default -vim default-pool.xml # Change the image path to the desired path -virsh pool-define default-pool.xml # From here we re-add the default. -virsh pool-start default -virsh pool-autostart default -``` - ### Error: "Vagrant failed to initialize at a very early stage" W set the `VAGRANT_HOME` environment variable to the CWD. diff --git a/util/github-runners-vagrant/Vagrantfile-builder b/util/github-runners-vagrant/Vagrantfile-builder new file mode 100644 index 0000000000..c0c2380b95 --- /dev/null +++ b/util/github-runners-vagrant/Vagrantfile-builder @@ -0,0 +1,57 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant.configure("2") do |config| + config.vm.box = "generic/ubuntu2204" + config.vm.box_check_update = true + config.vm.define "" + config.vm.hostname = "" + # allows us to ssh into the machine, addressing the problem below + # https://www.reddit.com/r/vagrant/comments/sb7hfl/new_to_vagrant_getting_efault_warning/ + config.ssh.username = "vagrant" + config.ssh.password = "vagrant" + + config.vm.provider "libvirt" do |vb| + # Customize the amount of cpus and memory on the VM: + vb.cpus = "4".to_i + vb.memory = "16384".to_i + end + + # sets up vm + config.vm.provision :shell, path: "provision_root.sh" + config.vm.provision :shell, privileged: false, path: "provision_nonroot.sh" + # To ensure we don't run out of memory, we enable dynamic Swap Space. This is + # done via the "swapspace" daemon: https://pqxx.org/development/swapspace/ + config.vm.provision :shell, inline: "sudo apt install swapspace -y" + # The provision_root.sh adds the vagrant user to the docker group, so we need to reload the VM. + config.vm.provision :reload + config.vm.provision :shell, run: 'always', inline: <<-SHELL + # When running gem5 in SE mode we must overcommit memory. + # This is run on every startup of the VM. + /sbin/sysctl vm.overcommit_memory=1 + SHELL + config.vm.provision :shell, privileged: false, run: 'always', inline: <<-SHELL + if [ -d ~/actions-runner ]; then + # This will be run everytime the VM is run (once created). + cd actions-runner + nohup ./run.sh & + else + # This will be run the first time the VM is created. + mkdir ~/actions-runner && cd ~/actions-runner + curl -so actions-runner-linux-x64-2.304.0.tar.gz -L \ + https://github.com/actions/runner/releases/download/v2.304.0/actions-runner-linux-x64-2.304.0.tar.gz + tar xzf ./actions-runner-linux-x64-2.304.0.tar.gz + + # configure the runner + # echo automatically sets the name of the runner, and the tags + # create a personal access token with admin permission and copy it into the curl command + echo -ne '\n\nbuild\n\n' | ./config.sh --url https://github.com/ --token $(curl -L \ + -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer " \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos//actions/runners/registration-token | jq -r '.token') + # start the runner + nohup ./run.sh & + fi + SHELL + +end diff --git a/util/github-runners-vagrant/Vagrantfile-runner b/util/github-runners-vagrant/Vagrantfile-runner new file mode 100644 index 0000000000..eb4054ed16 --- /dev/null +++ b/util/github-runners-vagrant/Vagrantfile-runner @@ -0,0 +1,56 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant.configure("2") do |config| + config.vm.box = "generic/ubuntu2204" + config.vm.box_check_update = true + config.vm.define "" + config.vm.hostname = "" + # allows us to ssh into the machine, addressing the problem below + # https://www.reddit.com/r/vagrant/comments/sb7hfl/new_to_vagrant_getting_efault_warning/ + config.ssh.username = "vagrant" + config.ssh.password = "vagrant" + + config.vm.provider "libvirt" do |vb| + # Customize the amount of cpus and memory on the VM: + vb.cpus = "1".to_i + vb.memory = "8192".to_i + end + + # sets up vm + config.vm.provision :shell, path: "provision_root.sh" + config.vm.provision :shell, privileged: false, path: "provision_nonroot.sh" + # To ensure we don't run out of memory, we enable dynamic Swap Space. This is + # done via the "swapspace" daemon: https://pqxx.org/development/swapspace/ + config.vm.provision :shell, inline: "sudo apt install swapspace -y" + # The provision_root.sh adds the vagrant user to the docker group, so we need to reload the VM. + config.vm.provision :reload + config.vm.provision :shell, run: 'always', inline: <<-SHELL + # When running gem5 in SE mode we must overcommit memory. + # This is run on every startup of the VM. + /sbin/sysctl vm.overcommit_memory=1 + SHELL + config.vm.provision :shell, privileged: false, run: 'always', inline: <<-SHELL + if [ -d ~/actions-runner ]; then + # This will be run everytime the VM is run (once created). + cd actions-runner + nohup ./run.sh & + else + # This will be run the first time the VM is created. + mkdir ~/actions-runner && cd ~/actions-runner + curl -so actions-runner-linux-x64-2.304.0.tar.gz -L \ + https://github.com/actions/runner/releases/download/v2.304.0/actions-runner-linux-x64-2.304.0.tar.gz + tar xzf ./actions-runner-linux-x64-2.304.0.tar.gz + + # configure the runner + # echo automatically sets the name of the runner, and the tags + # create a personal access token with admin permission and copy it into the curl command + echo -ne '\n\nrun\n\n' | ./config.sh --url https://github.com/ --token $(curl -L \ + -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer " \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos//actions/runners/registration-token | jq -r '.token') + # start the runner + nohup ./run.sh & + fi + SHELL +end diff --git a/util/github-runners-vagrant/vm_manager.sh b/util/github-runners-vagrant/vm_manager.sh new file mode 100755 index 0000000000..ce46eb3fe7 --- /dev/null +++ b/util/github-runners-vagrant/vm_manager.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +NUM_RUNNERS=20 +NUM_BUILDERS=3 +RUNNER_PREFIX="$(hostname)-runner-" +BUILDER_PREFIX="$(hostname)-builder-" + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +export VAGRANT_HOME=${SCRIPT_DIR} + +param="up" +if [[ $# -ge 1 ]]; then + param=$1 + if [[ "${param}" != "destroy" ]] && [[ "${param}" != "shutdown" ]]; then + echo "Only valid parameters are 'destroy' and 'shutdown' to destroy all VMs or shutdown all VMs" + exit 1 + fi +fi + + +for (( i=1; i<=NUM_RUNNERS; i++ )); do + sed -i "s/ config.vm.define.*/ config.vm.define \"${RUNNER_PREFIX}${i}\"/g" Vagrantfile-runner + sed -i "s/ config.vm.hostname.*/ config.vm.hostname = \"${RUNNER_PREFIX}${i}\"/g" Vagrantfile-runner + if [[ "${param}" == "destroy" ]]; then + VAGRANT_VAGRANTFILE=Vagrantfile-runner vagrant destroy -f + elif [[ "${param}" == "shutdown" ]]; then + VAGRANT_VAGRANTFILE=Vagrantfile-runner vagrant halt -f + else + VAGRANT_VAGRANTFILE=Vagrantfile-runner vagrant up --provider=libvirt + fi +done + +for (( i=1; i<=NUM_BUILDERS; i++ )); do + sed -i "s/ config.vm.define.*/ config.vm.define \"${BUILDER_PREFIX}${i}\"/g" Vagrantfile-builder + sed -i "s/ config.vm.hostname.*/ config.vm.hostname = \"${BUILDER_PREFIX}${i}\"/g" Vagrantfile-builder + if [[ "${param}" == "destroy" ]]; then + VAGRANT_VAGRANTFILE=Vagrantfile-builder vagrant destroy -f + elif [[ "${param}" == "shutdown" ]]; then + VAGRANT_VAGRANTFILE=Vagrantfile-builder vagrant halt -f + else + VAGRANT_VAGRANTFILE=Vagrantfile-builder vagrant up --provider=libvirt + fi +done