]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: selftests: SEV-SNP test for KVM_SEV_INIT2
authorPratik R. Sampat <prsampat@amd.com>
Wed, 5 Mar 2025 22:59:52 +0000 (16:59 -0600)
committerSean Christopherson <seanjc@google.com>
Fri, 2 May 2025 19:32:32 +0000 (12:32 -0700)
commit68ed692e395470a178bfdb6d417c43ebd12861b6
tree8a222240c9ed6babd877809333a39cba37de9e57
parent45eb29140e68ffe8e93a5471006858a018480a45
KVM: selftests: SEV-SNP test for KVM_SEV_INIT2

Add the X86_FEATURE_SEV_SNP CPU feature to the architectural definition
for the SEV-SNP VM type to exercise the KVM_SEV_INIT2 call. Ensure that
the SNP test is skipped in scenarios where CPUID supports it but KVM
does not, preventing reporting of failure in such cases.

Reviewed-by: Nikunj A Dadhania <nikunj@amd.com>
Signed-off-by: Pratik R. Sampat <prsampat@amd.com>
Link: https://lore.kernel.org/r/20250305230000.231025-3-prsampat@amd.com
[sean: use the same pattern as SEV and SEV-ES]
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/include/x86/processor.h
tools/testing/selftests/kvm/x86/sev_init2_tests.c