selftests: KVM: allow sev_migrate_tests on machines without SEV-ES
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 18 Feb 2022 10:07:09 +0000 (05:07 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 18 Feb 2022 10:16:43 +0000 (05:16 -0500)
commit1e8ff29fbbde01e18d97f7b68d1e90260844ca19
tree2c2df3607cced48661f251062c5102befd65b091
parentb2125513dfc0dd0ec5a9605138a3c356592cfb73
selftests: KVM: allow sev_migrate_tests on machines without SEV-ES

I managed to get hold of a machine that has SEV but not SEV-ES, and
sev_migrate_tests fails because sev_vm_create(true) returns ENOTTY.
Fix this, and while at it also return KSFT_SKIP on machines that do
not have SEV at all, instead of returning 0.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/x86_64/sev_migrate_tests.c