-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add exceptions to the check of CPU feature diff between host and guest on ubuntu #4900
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4900 +/- ##
=======================================
Coverage 84.10% 84.10%
=======================================
Files 251 251
Lines 28080 28080
=======================================
Hits 23616 23616
Misses 4464 4464
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
f05347d
to
46ce60d
Compare
# through the "flush_l1d" CPUID bit to guests. | ||
# https://github.com/torvalds/linux/commit/45cf86f26148e549c5ba4a8ab32a390e4bde216e | ||
# See also https://github.com/firecracker-microvm/firecracker/issues/4899 | ||
if "Ubuntu" in global_props.os: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the commit in the Ubuntu host kernel there by virtue of Ubuntu backporting it, or because it is v6.8?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latter. See #4899 for more details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we then make the check:
if global_props.linux_version_tpl >= (6, 8)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. We might want to add newer Amazon Linux kernel later (like AL2025 or something).
tests/integration_tests/functional/test_cpu_features_aarch64.py
Outdated
Show resolved
Hide resolved
66139a4
to
a54a2cc
Compare
Linux kernel should hide "ssbs" since Neoverse-N1 and Neoverse-V1 have an errata whereby an MSR to the SSBS special-purpose register does not affect subsequent speculative instructions, permitting speculative store bypassing for a window of time. Although Amazon Linux host kernels (v5.10 and v6.1) backported it, the guest kernels (v5.10 and v6.1) and the ubuntu host kernel (currently v6.8) lack the change. Fixes: 2babc80 ("test(aarch64): add host vs guest cpu feature test") Signed-off-by: Takahiro Itazuri <itazur@amazon.com>
Linux kernel v6.4+ passes through the "l1d_flush" CPUID bit to guests. While the ubuntu host kernel (v6.8) has the change, the latest Amazon Linux 2 and Amazon Linux 2023 doesn't. Fixes: 4e014a1 ("test(x86_64): add host vs guest cpu feature test") Signed-off-by: Takahiro Itazuri <itazur@amazon.com>
Linux kernel v6.6+ drops the synthetic feature flag. While the ubuntu host kernel (v6.8) has the change, the Amazon Linux kernels (v5.10 and v6.1) and the guest kernels (v5.10 and v6.1) don't. Fixes: 4e014a1 ("test(x86_64): add host vs guest cpu feature test") Signed-off-by: Takahiro Itazuri <itazur@amazon.com>
a54a2cc
to
b276fc1
Compare
Reason
PR #4884 introduced a test that ensures CPU feature diff between host and guest hasn't been changed.
However, the expected diff can vary depending on a combination of host kernel version and guest kernel version.
The current our setting is as follows:
Changes
Note that I implemented it in a general way as possible because we might want to support more host and guest kernels in the future.
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 thisPR.
[ ] API changes follow the Runbook for Firecracker API changes.[ ] User-facing changes are mentioned inCHANGELOG.md
.TODO
s link to an issue.contribution quality standards.
rust-vmm
.