Skip to content

[DRAFT] Enable to run functional tests on Intel Sapphire Rapids #5067

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

Closed

Conversation

zulinx86
Copy link
Contributor

@zulinx86 zulinx86 commented Mar 6, 2025

This PR must be merged after:

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

  • I have read and understand CONTRIBUTING.md.
  • I have run tools/devtool checkstyle to verify that the PR passes the
    automated style checks.
  • I have described what is done in these changes, why they are needed, and
    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 in CHANGELOG.md.
  • If a specific issue led to this PR, this PR closes the issue.
  • When making API changes, I have followed the
    Runbook for Firecracker API changes.
  • I have tested all new and changed functionalities in unit tests and/or
    integration tests.
  • I have linked an issue to every new TODO.

  • This functionality cannot be added in rust-vmm.

zulinx86 added 7 commits March 5, 2025 19:08
Bindings for ARCH_REQ_XCOMP_GUEST_PERM and ARCH_XCOMP_TILEDATA are
required to enable Intel AMX's XTILEDATA for XSAVE. Note that the
required bits were added in kernel v6.4+.

Signed-off-by: Takahiro Itazuri <[email protected]>
Eq and PartialEq are not necessary for KvmError, rather disallows me to
add error variants wrapping std::io::Error to handle syscall errors.

Signed-off-by: Takahiro Itazuri <[email protected]>
Intel AMX was introduced in Intel Sapphire Rapids and stands for
Advanced Matrix Extensions that accelerates deep learning and artificial
intelligence workloads. Since it requires larger area to save its state,
the TILEDATA feature is disabled by default. We enable it by default
because it can be disabled via CPU template. Otherwise, kernels prior to
v6.4 have a bug where KVM_GET_SUPPORTED_CPUID returns an inconsistent
state of TILECFG enabled but TILEDATA disabled by default, causing
guest's #GP fault on xsetbv instruction.

Signed-off-by: Takahiro Itazuri <[email protected]>
We have to skip the snapshot restore performance test on Intel Sapphire
Rappids for now, since a new KVM API (KVM_GET_XSAVE2) that has not been
supported yet in rust-vmm kvm-ioctls, although it will be supported
soon. To skip on Intel Sapphire Rapids, the python testing framework has
to be able to detect Intel Sapphire Rapids.

Signed-off-by: Takahiro Itazuri <[email protected]>
To support the snapshot restore feature, a new KVM API (KVM_GET_XSAVE2)
is required but it has not been supported yet in rust-vmm kvm-ioctls.
Until supported, skip the snapshot restore performance test for now.

Signed-off-by: Takahiro Itazuri <[email protected]>
CPU features that lscpu command shows can vary depending on guest
kernels.

Signed-off-by: Takahiro Itazuri <[email protected]>
Some new features are added.

Signed-off-by: Takahiro Itazuri <[email protected]>
Copy link

codecov bot commented Mar 6, 2025

Codecov Report

Attention: Patch coverage is 71.05263% with 11 lines in your changes missing coverage. Please review.

Project coverage is 83.17%. Comparing base (b4cb9d3) to head (08e48dd).
Report is 96 commits behind head on main.

Files with missing lines Patch % Lines
src/vmm/src/vstate/kvm.rs 71.05% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5067      +/-   ##
==========================================
- Coverage   83.19%   83.17%   -0.02%     
==========================================
  Files         247      247              
  Lines       26641    26682      +41     
==========================================
+ Hits        22163    22194      +31     
- Misses       4478     4488      +10     
Flag Coverage Δ
5.10-c5n.metal 83.66% <71.05%> (-0.01%) ⬇️
5.10-m5n.metal 83.65% <71.05%> (-0.01%) ⬇️
5.10-m6a.metal 82.86% <71.05%> (-0.01%) ⬇️
5.10-m6g.metal 79.66% <0.00%> (ø)
5.10-m6i.metal 83.65% <71.05%> (-0.01%) ⬇️
5.10-m7g.metal 79.66% <0.00%> (ø)
6.1-c5n.metal 83.64% <57.89%> (-0.03%) ⬇️
6.1-m5n.metal 83.63% <57.89%> (-0.03%) ⬇️
6.1-m6a.metal 82.86% <57.89%> (-0.01%) ⬇️
6.1-m6g.metal 79.66% <0.00%> (ø)
6.1-m6i.metal 83.63% <57.89%> (-0.03%) ⬇️
6.1-m7g.metal ?

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.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@zulinx86
Copy link
Contributor Author

close in favor of #5084

@zulinx86 zulinx86 closed this Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant