-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix(vmm): Support kernel >= 5.16 and < 5.17 for xfeature enabling #5447
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
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5447 +/- ##
==========================================
- Coverage 82.76% 82.75% -0.02%
==========================================
Files 263 263
Lines 27300 27307 +7
==========================================
+ Hits 22594 22597 +3
- Misses 4706 4710 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
I think we should add a changelog entry. |
It is the kernel commit that actually is needed for ARCH_GET_XCOMP_SUPP. Signed-off-by: Takahiro Itazuri <[email protected]>
The link would be helpful for people who don't have much context around that. Signed-off-by: Takahiro Itazuri <[email protected]>
The Linux kernel introduced some arch_prctl() APIs (ARCH_GET_XCOMP_SUPP, ARCH_GET_XCOMP_PERM and ARCH_REQ_XCOMP_PERM) to support dynamic XSTATE feature enabling for "userspace applications" in 5.16 [1]. To support that for "KVM guest", v5.17 introduced additional arch_prctl() APIs (ARCH_GET_XCOMP_GUEST_PERM and ARCH_REQ_XCOMP_GUEST_PERM) [2]. Note that ARCH_XCOMP_GUEST_SUPP does not exist, so regardless of userspace application or KVM guest, ARCH_GET_XCOMP_SUPP is used to retrieve supported features. As a result, kernel versions >= 5.16 and < 5.17 report supported features via ARCH_GET_XCOMP_SUPP but ARCH_REQ_XCOMP_GUEST_PERM fail with EINVAL. [1]: torvalds/linux@db8268d [2]: torvalds/linux@980fe2f Signed-off-by: Takahiro Itazuri <[email protected]>
Fixes #5438.
Changes / Reason
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
tools/devtool checkbuild --all
to verify that the PR passesbuild checks on all supported architectures.
tools/devtool checkstyle
to verify that the PR passes theautomated style checks.
how they are solving the problem in a clear and encompassing way.
[ ] I have updated any relevant documentation (both in code and in the docs)in the PR.
[ ] I have mentioned all user-facing changes inCHANGELOG.md
.[ ] When making API changes, I have followed theRunbook for Firecracker API changes.
integration tests.
[ ] I have linked an issue to every newTODO
.rust-vmm
.