-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
AMD SEV Debugswap #5594
AMD SEV Debugswap #5594
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the typo in the patch title OvmfPkf->OvmfPkg. Also, there are two OvmfPkg patches with similar names that do different things, so please try to be more descriptive.
I'm fixing the typo but I cannot figure out better subject lines. Which two do you want to differ more? thanks, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never mind the titles - let's keep them as they are.
Looks good to me. Note #1: this conflicts with another pending PR updating the AMD header files. Note #2: I think @jyao1 should have a look at the PCD changes, whenever there are any concerns from TDX point of view (probably not), and whenever TDX has a simliar feature so it might make sense to define a common attr bit for that (maybe). |
ping? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change in MdePkg looks good to me.
For now we need DebugSwap but others are likely to be needed too. Cc: Liming Gao <[email protected]> Cc: Michael D Kinney <[email protected]> Cc: Zhiguang Liu <[email protected]> Reviewed-by: Tom Lendacky <[email protected]> Signed-off-by: Alexey Kardashevskiy <[email protected]> Changes: v5: * "rb" from Tom v4: * added more from April/2024 APM
PcdConfidentialComputingGuestAttr so far only contained an SEV mode bit but there are more other features which do not translate to levels such as DebugVirtualization or SecureTsc. Add the feature mask and the DebugVirtualization feature bit to the PCD. Cc: Liming Gao <[email protected]> Cc: Michael D Kinney <[email protected]> Cc: Zhiguang Liu <[email protected]> Reviewed-by: Tom Lendacky <[email protected]> Signed-off-by: Alexey Kardashevskiy <[email protected]> --- Changes: v4: * s/CCAttrFeatureAmdSevDebugSwap/CCAttrFeatureAmdSevEsDebugVirtualization/ v2: * expanded features mask * added type mask
The SEV-ES DebugVirtualization feature enables type B swapping of debug registers on #VMEXIT and makes #DB and DR7 intercepts unnecessary and unwanted. When DebugVirtualization is enabled, this stops booting if interaction from the HV. Add new API to PEI, SEC, DXE. This does not change the existing behaviour yet. Cc: Ard Biesheuvel <[email protected]> Cc: Erdem Aktas <[email protected]> Cc: Gerd Hoffmann <[email protected]> Cc: Jiewen Yao <[email protected]> Cc: Michael Roth <[email protected]> Cc: Min Xu <[email protected]> Reviewed-by: Tom Lendacky <[email protected]> Signed-off-by: Alexey Kardashevskiy <[email protected]> --- Changes: v5: * "rb" from Tom v4: * s/DebugSwap/DebugVirtualization/
CONFIDENTIAL_COMPUTING_GUEST_ATTR is not a simple SEV level anymore and includes a feature mask since the previous commit. Fix AmdMemEncryptionAttrCheck to check the level and feature correctly and add DebugVirtualization support. Since the actual feature flag is not set yet, this should cause no behavioural change. Cc: Gerd Hoffmann <[email protected]> Cc: Jiaxin Wu <[email protected]> Cc: Rahul Kumar <[email protected]> Cc: Ray Ni <[email protected]> Reviewed-by: Tom Lendacky <[email protected]> Signed-off-by: Alexey Kardashevskiy <[email protected]> --- Changes: v5: * "rb" from Tom
Write the feature bit into PcdConfidentialComputingGuestAttr and enable DebugVirtualization in PEI, SEC, DXE. Cc: Ard Biesheuvel <[email protected]> Cc: Erdem Aktas <[email protected]> Cc: Gerd Hoffmann <[email protected]> Cc: Jiewen Yao <[email protected]> Cc: Michael Roth <[email protected]> Cc: Min Xu <[email protected]> Reviewed-by: Tom Lendacky <[email protected]> Signed-off-by: Alexey Kardashevskiy <[email protected]> --- Changes: v5: * "rb" from Tom v4: * s/DebugSwap/DebugVirtualization/g
This is to prevent #DB interception on AMD SEV-ES VM with enabled DebugSwap feature.
The goal of this pull request is CI check, attempt 4.