]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: selftests: Introduce SEV VM type check
authorPratik R. Sampat <prsampat@amd.com>
Wed, 5 Mar 2025 22:59:56 +0000 (16:59 -0600)
committerSean Christopherson <seanjc@google.com>
Fri, 2 May 2025 19:32:33 +0000 (12:32 -0700)
commit4a4e1e8e92eb99611c8988d563e1781b067408b5
tree8b4e89ccdfb9b1db23e03491506a4f9c73726ecf
parentf694f30e81c4ade358eb8c75273bac1a48f0cb8f
KVM: selftests: Introduce SEV VM type check

In preparation for SNP, declutter the vm type check by introducing a
SEV-SNP VM type check as well as a transitive set of helper functions.

The SNP VM type is the subset of SEV-ES. Similarly, the SEV-ES and SNP
types are subset of the SEV VM type check.

Signed-off-by: Pratik R. Sampat <prsampat@amd.com>
Link: https://lore.kernel.org/r/20250305230000.231025-7-prsampat@amd.com
[sean: make the helpers static inlines]
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/include/x86/sev.h
tools/testing/selftests/kvm/lib/x86/processor.c
tools/testing/selftests/kvm/x86/sev_smoke_test.c