-
Notifications
You must be signed in to change notification settings - Fork 55
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 new TDCALL functions to support TD partitioning #714
Merged
Conversation
This file contains 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
TD page accept call can fail sometimes with `TDX_OPERAND_BUSY` error code, in such cases simply retry the operation. Signed-off-by: Jason Chen CJ <[email protected]> Signed-off-by: Vijay Dhanraj <[email protected]>
This is a precursor to introducing `td_accept_memory` which will accept both normal 4K pages as well as 2M huge pages. No functional change is introduced. Signed-off-by: Vijay Dhanraj <[email protected]>
This commit introduces `td_accept_memory` to accept a range of either 4K normal pages or 2M huge pages. This is basically a helper function which is wrapped around `td_accept_pages` and initializes the pages to zero using the TD ephemeral private key. Signed-off-by: Peter Fang <[email protected]> Signed-off-by: Vijay Dhanraj <[email protected]>
tdcall_vm_read/write is to access TD-scope meta field of a TD and tdcall_vp_read/write is to access vCPU-scope meta field of a TD. Signed-off-by: Jason Chen CJ <[email protected]> Signed-off-by: Chuanxiao Dong <[email protected]> Signed-off-by: Vijay Dhanraj <[email protected]>
Add tdcall_vp_invept/invvpid to provide SEPT flushing support Signed-off-by: Jason Chen CJ <[email protected]> Signed-off-by: Vijay Dhanraj <[email protected]>
jyao1
reviewed
Jun 18, 2024
Current asm_td_call implementation immediately returns on exit without saving guest vmexit reasons. Extend asm_td_call to save the guest vmexit reasons as part of RAX and also introduce `tdcall_vp_enter` interface to enter TDP guest. Signed-off-by: Jason Chen CJ <[email protected]> Signed-off-by: Vijay Dhanraj <[email protected]>
Add `tdcall_mem_page_attr_wr` interface to write memory attributes of a private page. It is also used to create or remove L2 page aliases as required. Signed-off-by: Chuanxiao Dong <[email protected]> Signed-off-by: Vijay Dhanraj <[email protected]>
jyao1
approved these changes
Jun 19, 2024
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.
Fixes: #707
Added the following TDCALL support as part of this PR.