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(cpu-template-helper): ignore wide registers #4409

Merged
merged 2 commits into from
Jan 29, 2024

Conversation

ShadowCurse
Copy link
Contributor

Changes

When SVE extension is enabled on aarch64 cpus, KVM will return wide registers when queried. Because cpu templates do not support registers wider than 128 bits we need to ignore wide registers when converting cpu configuration into a cpu template.

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.
  • The description of changes is clear and encompassing.
  • 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 in CHANGELOG.md.
  • All added/changed functionality is tested.
  • New TODOs link to an issue.
  • Commits meet contribution quality standards.

  • This functionality cannot be added in rust-vmm.

Copy link

codecov bot commented Jan 26, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (49db07b) 81.53% compared to head (a28d7a1) 81.54%.

Files Patch % Lines
...c/cpu-template-helper/src/template/dump/aarch64.rs 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4409      +/-   ##
==========================================
+ Coverage   81.53%   81.54%   +0.01%     
==========================================
  Files         241      241              
  Lines       29332    29335       +3     
==========================================
+ Hits        23916    23922       +6     
+ Misses       5416     5413       -3     
Flag Coverage Δ
4.14-c7g.metal 76.93% <75.00%> (+0.01%) ⬆️
4.14-m5d.metal 78.85% <ø> (-0.02%) ⬇️
4.14-m6a.metal 77.97% <ø> (ø)
4.14-m6g.metal 76.93% <75.00%> (+0.01%) ⬆️
4.14-m6i.metal 78.84% <ø> (ø)
5.10-c7g.metal 79.83% <75.00%> (+0.01%) ⬆️
5.10-m5d.metal 81.51% <ø> (-0.02%) ⬇️
5.10-m6a.metal 80.72% <ø> (ø)
5.10-m6g.metal 79.83% <75.00%> (+0.01%) ⬆️
5.10-m6i.metal 81.50% <ø> (ø)
6.1-c7g.metal 79.83% <75.00%> (+0.01%) ⬆️
6.1-m5d.metal 81.51% <ø> (-0.02%) ⬇️
6.1-m6a.metal 80.72% <ø> (ø)
6.1-m6g.metal 79.83% <75.00%> (+0.01%) ⬆️
6.1-m6i.metal 81.50% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ShadowCurse ShadowCurse marked this pull request as ready for review January 26, 2024 12:53
@ShadowCurse ShadowCurse added Status: Awaiting review Indicates that a pull request is ready to be reviewed Type: Fix Indicates a fix to existing code labels Jan 26, 2024
zulinx86
zulinx86 previously approved these changes Jan 26, 2024
@ShadowCurse
Copy link
Contributor Author

Should I add an entry in the CHANGELOG with this fix?
@pb8o @zulinx86

@pb8o
Copy link
Contributor

pb8o commented Jan 26, 2024

Should I add an entry in the CHANGELOG with this fix? @pb8o @zulinx86

Not sure... the limitation was already there, and documented somewhere, no?

pb8o
pb8o previously approved these changes Jan 26, 2024
@ShadowCurse
Copy link
Contributor Author

The limitation of cpu templates is documented. But this bug is in the helper tool and it can be visible by users if they try to use it with template that enables wide registers.

When SVE extension is enabled on aarch64 cpus, KVM will
return wide registers when queried. Because cpu templates
do not support registers wider than 128 bits we need
to ignore wide registers when converting cpu configuration
into a cpu template.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
CHANGELOG.md Outdated Show resolved Hide resolved
Add cpu-template-helper SVE related bug fix
to the CHANGELOG.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
@ShadowCurse ShadowCurse merged commit bb982cc into firecracker-microvm:main Jan 29, 2024
6 of 7 checks passed
@ShadowCurse ShadowCurse deleted the ingnore_sve_helper branch January 29, 2024 13:16
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants