-
Notifications
You must be signed in to change notification settings - Fork 2.1k
test: improve/extend/regather MSR baselines #3926
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pb8o
reviewed
Jul 4, 2023
055b952 to
5ef4fbf
Compare
pb8o
previously approved these changes
Jul 4, 2023
Comments on test_cpu_rdmsr explains what env those MSR baselines were gathered but does not show how to gather them. This commit adds a line that we can use to regather baseline by uncommenting it. Signed-off-by: Takahiro Itazuri <itazur@amazon.com>
Previously all the static CPU templates had not passed through MSRs from the host, so we did not need to have MSR baseline files for each CPU model. With PR firecracker-microvm#3907, the T2CL template passes through IA32_ARCH_CAPABILITIES.{RSBA/RRSBA} which results in difference of the MSR value between different CPU models. This commit enables MSR baselines for all the combinations of (host CPU, host kernel, guest kernel). Actual baseline regathering will be done in a successive commit. Signed-off-by: Takahiro Itazuri <itazur@amazon.com>
msr_reader.sh queries some ranges of MSR indices regardless of whether
they are implemented or not, and it has saved them with the STATUS field
("implemented" or "unimplemented") so far. However, a large portion of
them are unimplemented, resulting in large numbers of lines of baseline
files.
This commit drops unimplemented MSRs from msr_reader.sh. This should be
fine since not having some MSR indices implies that they are
unimplemented.
Signed-off-by: Takahiro Itazuri <itazur@amazon.com>
The last few commits dropped STATUS column from baseline files and introduced per-CPU model baselines. To make test_cpu_rdmsr pass, this commit regathers MSR baseline files. Signed-off-by: Takahiro Itazuri <itazur@amazon.com>
Changes `Path(snapshot_artifacts_dir)` to `snapshot_artifacts_dir`, since `snapshot_artifacts_dir` is already a `Path` object. Signed-off-by: Takahiro Itazuri <itazur@amazon.com>
pb8o
approved these changes
Jul 5, 2023
ShadowCurse
approved these changes
Jul 5, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Status: Awaiting review
Indicates that a pull request is ready to be reviewed
Type: Fix
Indicates a fix to existing code
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
Reason
Previously all the static CPU templates had not passed through MSRs from the host, so we did not need to have MSR baseline files for each host CPU model. With PR #3907, the T2CL template passes through IA32_ARCH_CAPABILITIES.{RSBA/RRSBA} which results in difference of the MSR value between different CPU models.
As discussed in #3926 (comment), a large portion of MSR baseline files are occupied by unimplemented MSRs.
License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following
Developer Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md.PR Checklist
[ ] If a specific issue led to this PR, this PR closes the issue.[ ] Any required documentation changes (code and docs) are included in this PR.[ ] API changes follow the Runbook for Firecracker API changes.[ ] User-facing changes are mentioned inCHANGELOG.md.[ ] NewTODOs link to an issue.rust-vmm.