- 
                Notifications
    
You must be signed in to change notification settings  - Fork 2.1k
 
Custom CPU template mapping Intel Sapphire Rapids to T2 #5146
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
      
      
    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
    
  
  
    
    
          Codecov ReportAll modified and coverable lines are covered by tests ✅ 
 Additional details and impacted files@@            Coverage Diff             @@
##             main    #5146      +/-   ##
==========================================
+ Coverage   83.02%   83.07%   +0.05%     
==========================================
  Files         250      250              
  Lines       26902    26902              
==========================================
+ Hits        22335    22349      +14     
+ Misses       4567     4553      -14     
 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:
  | 
    
While we use uppercase for static CPU templates (and have to do so to follow the API specification), we used lowercase for custom CPU templates. Using uppercase for both will make integration tests that support both types simpler. Signed-off-by: Takahiro Itazuri <[email protected]>
We do the same thing in multiple places. Signed-off-by: Takahiro Itazuri <[email protected]>
The tests defined in test_cpu_features_x86_64.py only supported static CPU templates. Static CPU template feature was deprecated a while ago and will be removed in v2.0 and custom CPu template feature is the alternative preferred option. Test custom CPU templates as well. Note that this change does not mean supporting more CPU templates than before. It just covers both types of CPU templates, so there are still filters for CPU templates supported by the test as they are. Signed-off-by: Takahiro Itazuri <[email protected]>
The Debug Store (DS) bit is enumerated on CPUID.01H:EDX[21]. CPUID.01H:EDX[20] is a reserved bit. Signed-off-by: Takahiro Itazuri <[email protected]>
Adds a CPU template mapping Intel Sapphire Rapids to EC2 T2 instance type. We need a different CPU template for older kernels (prior to v5.17), because KVM does not support Intel AMX. Signed-off-by: Takahiro Itazuri <[email protected]>
There is a utility function that accepts both static and custom CPU templates. Signed-off-by: Takahiro Itazuri <[email protected]>
Now it's ready to use Intel Sapphire Rapids fully on our pipelines :) Adds it to the test platforms doc. Official support declaration will be done in CHANGELOG later. Signed-off-by: Takahiro Itazuri <[email protected]>
b82cde5    to
    40e739c      
    Compare
  
    
              
                    pb8o
  
              
              previously approved these changes
              
                  
                    Apr 9, 2025 
                  
              
              
            
            
              
                    roypat
  
              
              reviewed
              
                  
                    Apr 9, 2025 
                  
              
              
            
            
We disable WAITPKG in CPUID normalization and it is expected that attempting to use it generates #UD in guest. Adds an integration test for it. Signed-off-by: Takahiro Itazuri <[email protected]>
40e739c    to
    b562368      
    Compare
  
    
              
                    roypat
  
              
              approved these changes
              
                  
                    Apr 9, 2025 
                  
              
              
            
            
              
                    pb8o
  
              
              approved these changes
              
                  
                    Apr 9, 2025 
                  
              
              
            
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  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
With this PR, Intel Sapphire Rapids is now supported :)
Note that the official support declaration will be done in CHANGELOG later.
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 checkstyleto 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.[ ] If a specific issue led to this PR, this PR closes the issue.[ ] When making API changes, I have followed theRunbook for Firecracker API changes.
integration tests.
[ ] I have linked an issue to every newTODO.rust-vmm.