Skip to content

Commit d23051f

Browse files
committed
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>
1 parent 9587dd7 commit d23051f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arch/x86/kvm/svm/sev.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +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-
static u64 sev_supported_vmsa_features;
57-
5856
static unsigned int nr_ciphertext_hiding_asids;
5957
module_param_named(ciphertext_hiding_asids, nr_ciphertext_hiding_asids, uint, 0444);
6058

@@ -81,6 +79,8 @@ module_param_named(ciphertext_hiding_asids, nr_ciphertext_hiding_asids, uint, 04
8179

8280
static u64 snp_supported_policy_bits __ro_after_init;
8381

82+
static u64 sev_supported_vmsa_features __ro_after_init;
83+
8484
#define INITIAL_VMSA_GPA 0xFFFFFFFFF000
8585

8686
static u8 sev_enc_bit;

0 commit comments

Comments
 (0)