]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: SEV: Move SEV-specific VM initialization to sev.c
authorSean Christopherson <seanjc@google.com>
Tue, 10 Mar 2026 23:48:19 +0000 (16:48 -0700)
committerSean Christopherson <seanjc@google.com>
Wed, 8 Apr 2026 23:04:27 +0000 (16:04 -0700)
commite353f1beeda3e7037f192235d5bd6abffacb49f6
treec223c1e2e10b0731e897f7b50ac12bfce2b7115a
parent7341500f8b8624616f3760206765b1ea01e2b849
KVM: SEV: Move SEV-specific VM initialization to sev.c

Move SEV+ VM initialization to sev.c (as sev_vm_init()) so that
kvm_sev_info (and all usage) can be gated on CONFIG_KVM_AMD_SEV=y without
needing more #ifdefs.  As a bonus, isolating the logic will make it easier
to harden the flow, e.g. to WARN if the vm_type is unknown.

No functional change intended (SEV, SEV_ES, and SNP VM types are only
supported if CONFIG_KVM_AMD_SEV=y).

Link: https://patch.msgid.link/20260310234829.2608037-12-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/sev.c
arch/x86/kvm/svm/svm.c
arch/x86/kvm/svm/svm.h