Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Intel MCG_CAP MSR update on switch #957

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Foxy-Boxes
Copy link

@BobbyRBruce BobbyRBruce added the arch-x86 The X86 ISA label Mar 23, 2024
@BobbyRBruce BobbyRBruce changed the base branch from stable to develop March 23, 2024 19:15
@BobbyRBruce BobbyRBruce changed the base branch from develop to stable March 23, 2024 19:20
@BobbyRBruce
Copy link
Member

Thanks for the contribution. There's a few things that need fixed before we can merge this.

  1. Your commit is going to fail our tests as the commit message it doesn't conform to our guidelines. We're lacking tags and a Change-ID, and the header is >62 characters long. You can see read more about this in our contributing guidelines here: https://github.com/gem5/gem5/blob/stable/CONTRIBUTING.md.

The easiest to fix all these problems would be with the following:

# Install our pre-commit hook with our install script.
./util/pre-commit-install.sh

# Run the hook on your commit and change the message.
git commit --amend

In your editor interface, change the commit message to read

arch-x86: Fix Intel MCG_CAP MSR update on switch

reason: https://www.intel.com/content/dam/develop/external/us/en/documents/335592-sdm-vol-4.pdf (2-30)

Save and close the editor. The Change-Id will be automatically added by the git hook. You can verify this with git log.

You can then force push the change with:

git push -f origin gem5
  1. You put this change on top of the stable branch. We make change on top of the develop branch. To fix this I'd recommend the following:
# Via `git log`, make not of the commit's SHA.
# Here I'll use '{SHA}' as a placeholder.

# Go to the develop branch of your git repository.
git switch develop

# Add the mainline gem5 repo as a remote repo and fetch it.
git remote add upstream https://github.com/gem5/gem5.git
git fetch upstream 

# Merge the upstream develop into your local develop branch.
git merge upstream/develop

# Create a new branch, from develop, for this change.
git switch -c pr-957-update

# Cherry Pick your change on top of this new branch.
git cherry-pick <SHA>

# Do a force push to this branch (i.e. https://github.com/Gem5Fork/gem5-fixintelmc/tree/stable).
git push -f origin stable

@Foxy-Boxes
Copy link
Author

Foxy-Boxes commented Mar 26, 2024

I have identified __mcheck_cpu_cap_init writes a kernel variable so that the capacity check is actually done with the initial value of the msr: MCG_CAP thus we need to change the value before kvm starts, in short this is not ready yet.

@BobbyRBruce BobbyRBruce self-requested a review March 28, 2024 17:39
@ivanaamit
Copy link
Contributor

Hi @Foxy-Boxes, what is the status of this PR? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-x86 The X86 ISA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants