]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: KVM: sev_migrate_tests: Fix sev_ioctl()
authorPeter Gonda <pgonda@google.com>
Wed, 8 Dec 2021 19:16:41 +0000 (11:16 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 7 Jan 2022 15:44:38 +0000 (10:44 -0500)
commit30d033ddf9a2c1da3452e8078a71c4a5b90e51c6
treeda5249572180ae2cf73238cc78bcf7741f7f3751
parent2ed481a8dc8f6dfcf0f6a4bea3cb40c7c939d2f9
selftests: KVM: sev_migrate_tests: Fix sev_ioctl()

TEST_ASSERT in SEV ioctl was allowing errors because it checked return
value was good OR the FW error code was OK. This TEST_ASSERT should
require both (aka. AND) values are OK. Removes the LAUNCH_START from the
mirror VM because this call correctly fails because mirror VMs cannot
call this command. Currently issues with the PSP driver functions mean
the firmware error is not always reset to SEV_RET_SUCCESS when a call is
successful. Mainly sev_platform_init() doesn't correctly set the fw
error if the platform has already been initialized.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Sean Christopherson <seanjc@google.com>
Cc: Marc Orr <marcorr@google.com>
Signed-off-by: Peter Gonda <pgonda@google.com>
Message-Id: <20211208191642.3792819-3-pgonda@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/x86_64/sev_migrate_tests.c