mbox series

[RFC,0/5] SEV Kernel Selftests

Message ID 20240710220540.188239-1-pratikrajesh.sampat@amd.com (mailing list archive)
Headers show
Series SEV Kernel Selftests | expand

Message

Pratik R. Sampat July 10, 2024, 10:05 p.m. UTC
This patchset introduces SEV-SNP test to the kernel selftest framework.
It also adds negative testing of SEV, ES and SNP VM types.

Patch 1 - Extend the sev smoke tests to use the SNP specific ioctl
calls and sets up memory to boot a SNP guest VM
Patch 2 - Cleanup patch that decouples the ioctl calls from the sev
selftest library with its test assert and status counterparts. No
functional change introduced
Patch 3 - Introduce ioctl test for SEV, ES
Patch 4 - Introduce positive and negative ioctl test for SEV-SNP
Patch 5 - Adds the X86_FEATURE_SEV_SNP vm type test for KVM_SEV_INIT2

Any feedback/review on the approach and design is highly appreciated!

Pratik R. Sampat (5):
  selftests: KVM: Add a basic SNP smoke test
  selftests: KVM: Decouple SEV ioctls from asserts
  selftests: KVM: SEV IOCTL test
  selftests: KVM: SNP IOCTL test
  selftests: KVM: SEV-SNP test for KVM_SEV_INIT2

 .../selftests/kvm/include/x86_64/processor.h  |   1 +
 .../selftests/kvm/include/x86_64/sev.h        |  39 ++-
 tools/testing/selftests/kvm/lib/kvm_util.c    |   7 +-
 .../selftests/kvm/lib/x86_64/processor.c      |   6 +-
 tools/testing/selftests/kvm/lib/x86_64/sev.c  | 181 +++++++++++---
 .../selftests/kvm/x86_64/sev_init2_tests.c    |  13 +
 .../selftests/kvm/x86_64/sev_smoke_test.c     | 223 +++++++++++++++++-
 7 files changed, 418 insertions(+), 52 deletions(-)