Skip to content

Commit 9587dd7

Browse files
committed
KVM: SVM: Drop the module param to control SEV-ES DebugSwap
Rip out the DebugSwap module param, as the sequence of events that led to its inclusion was one big mistake, the param no longer serves any purpose. Commit d1f85fb ("KVM: SEV: Enable data breakpoints in SEV-ES") goofed by not adding a way for the userspace VMM to control the feature. Functionally, that was fine, but it broke attestation signatures because SEV_FEATURES are included in the signature. Commit 5abf6dc ("SEV: disable SEV-ES DebugSwap by default") fixed that issue, but the underlying flaw of userspace not having a way to control SEV_FEATURES was still there. That flaw was addressed by commit 4f5defa ("KVM: SEV: introduce KVM_SEV_INIT2 operation"), and so then 4dd5eca ("KVM: SEV: allow SEV-ES DebugSwap again") re-enabled DebugSwap by default. Now that the dust has settled, the module param doesn't serve any meaningful purpose. Cc: Tom Lendacky <thomas.lendacky@amd.com> Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com> Link: https://patch.msgid.link/20260109033101.1005769-2-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent ca2eccb commit 9587dd7

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

arch/x86/kvm/svm/sev.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@ module_param_named(sev_es, sev_es_enabled, bool, 0444);
5353
static bool sev_snp_enabled = true;
5454
module_param_named(sev_snp, sev_snp_enabled, bool, 0444);
5555

56-
/* enable/disable SEV-ES DebugSwap support */
57-
static bool sev_es_debug_swap_enabled = true;
58-
module_param_named(debug_swap, sev_es_debug_swap_enabled, bool, 0444);
5956
static u64 sev_supported_vmsa_features;
6057

6158
static unsigned int nr_ciphertext_hiding_asids;
@@ -3150,12 +3147,10 @@ void __init sev_hardware_setup(void)
31503147
sev_es_enabled = sev_es_supported;
31513148
sev_snp_enabled = sev_snp_supported;
31523149

3153-
if (!sev_es_enabled || !cpu_feature_enabled(X86_FEATURE_DEBUG_SWAP) ||
3154-
!cpu_feature_enabled(X86_FEATURE_NO_NESTED_DATA_BP))
3155-
sev_es_debug_swap_enabled = false;
3156-
31573150
sev_supported_vmsa_features = 0;
3158-
if (sev_es_debug_swap_enabled)
3151+
3152+
if (sev_es_enabled && cpu_feature_enabled(X86_FEATURE_DEBUG_SWAP) &&
3153+
cpu_feature_enabled(X86_FEATURE_NO_NESTED_DATA_BP))
31593154
sev_supported_vmsa_features |= SVM_SEV_FEAT_DEBUG_SWAP;
31603155

31613156
if (sev_snp_enabled && tsc_khz && cpu_feature_enabled(X86_FEATURE_SNP_SECURE_TSC))

0 commit comments

Comments
 (0)