Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

KVM: SVM: Tag sev_supported_vmsa_features as read-only after init

Tag sev_supported_vmsa_features with __ro_after_init as it's configured by
sev_hardware_setup() and never written after initial configuration (and if
it were, that'd be a blatant bug).

Opportunistically relocate the variable out of the module params area now
that sev_es_debug_swap_enabled is gone (which largely motivated its
original location).

Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Link: https://patch.msgid.link/20260109033101.1005769-3-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>

+2 -2
+2 -2
arch/x86/kvm/svm/sev.c
··· 53 53 static bool sev_snp_enabled = true; 54 54 module_param_named(sev_snp, sev_snp_enabled, bool, 0444); 55 55 56 - static u64 sev_supported_vmsa_features; 57 - 58 56 static unsigned int nr_ciphertext_hiding_asids; 59 57 module_param_named(ciphertext_hiding_asids, nr_ciphertext_hiding_asids, uint, 0444); 60 58 ··· 78 80 SNP_POLICY_MASK_PAGE_SWAP_DISABLE) 79 81 80 82 static u64 snp_supported_policy_bits __ro_after_init; 83 + 84 + static u64 sev_supported_vmsa_features __ro_after_init; 81 85 82 86 #define INITIAL_VMSA_GPA 0xFFFFFFFFF000 83 87