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

tests : add check on the max nb of TDs that can be run in parralel #340

Merged
merged 2 commits into from
Mar 21, 2025

Conversation

hector-cao
Copy link
Collaborator

@hector-cao hector-cao commented Mar 21, 2025

There is a limit on the number of TDs that can be run in parralel.                         
This limit can be due to several factors, but the most prevalent factor                    
is the number of keys the CPU can allocate to TDs.                                         
In fact, TDX takes advantage of an existing CPU feature called MK-TME                      
(Multi-key Total Memory Encryption) to encrypt the VM memory. It enables                   
the CPU to encrypt each TD’s memory with a unique Advanced Encryption Standard (AES) key.  
MK-TME offers a number of keys and this key space is partionned into 2 sets:               
Shared (VMM) and Private (TDX). The number of key in the Private space defines the         
maximum number of TDs we can run in parralel.                                              
                                                                                           
This test verifies that we can run TDs up to this limit and any new TD creation            
is refused by qemu in a nice way.

You can run this test with:

$ cd tests
$ sudo ./tdtest -k 'test_stress_max_guests'

@hector-cao hector-cao requested a review from a team March 21, 2025 09:58
Copy link
Collaborator

@frenchwr frenchwr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@hector-cao hector-cao merged commit be44415 into main Mar 21, 2025
2 checks passed
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.

2 participants