]> Gentwo Git Trees - linux/.git/commit
KVM: SEV: Drop GHCB_VERSION_DEFAULT and open code it
authorNikunj A Dadhania <nikunj@amd.com>
Tue, 19 Aug 2025 23:48:26 +0000 (16:48 -0700)
committerSean Christopherson <seanjc@google.com>
Thu, 21 Aug 2025 15:44:49 +0000 (08:44 -0700)
commitc78af20374a1c9c230cc535857d2af3de5d4442c
tree7f21557aee3fca6afd7f7b4b2a7295276290294a
parentc17b750b3ad9f45f2b6f7e6f7f4679844244f0b9
KVM: SEV: Drop GHCB_VERSION_DEFAULT and open code it

Remove the GHCB_VERSION_DEFAULT macro and open code it with '2'. The macro
is used conditionally and is not a true default. KVM ABI does not
advertise/emumerates the default GHCB version. Any future change to this
macro would silently alter the ABI and potentially break existing
deployments that rely on the current behavior.

Additionally, move the GHCB version assignment earlier in the code flow and
update the comment to clarify that KVM_SEV_INIT2 defaults to version 2,
while KVM_SEV_INIT forces version 1.

No functional change intended.

Cc: Thomas Lendacky <thomas.lendacky@amd.com>
Cc: Michael Roth <michael.roth@amd.com>
Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Nikunj A Dadhania <nikunj@amd.com>
Link: https://lore.kernel.org/r/20250819234833.3080255-2-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/sev.c