diff options
author | Vitaly Kuznetsov <vkuznets@redhat.com> | 2023-12-05 11:36:23 +0100 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2023-12-07 09:34:36 -0800 |
commit | 6dac1195181cb561a1ac32b92f58c92e87a91c70 (patch) | |
tree | 4201a7b46ca1df161d561c355aaad2e34dc1b71b /tools/testing/selftests/kvm/x86_64/hyperv_ipi.c | |
parent | b2e02f82b7f76234305c5a7fba4dbebc47ce4cb5 (diff) |
KVM: selftests: Make Hyper-V tests explicitly require KVM Hyper-V support
In preparation for conditional Hyper-V emulation enablement in KVM, make
Hyper-V specific tests skip gracefully instead of failing when KVM support
for emulating Hyper-V is not there.
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Tested-by: Jeremi Piotrowski <jpiotrowski@linux.microsoft.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Link: https://lore.kernel.org/r/20231205103630.1391318-10-vkuznets@redhat.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/testing/selftests/kvm/x86_64/hyperv_ipi.c')
-rw-r--r-- | tools/testing/selftests/kvm/x86_64/hyperv_ipi.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/kvm/x86_64/hyperv_ipi.c b/tools/testing/selftests/kvm/x86_64/hyperv_ipi.c index 6feb5ddb031d..65e5f4c05068 100644 --- a/tools/testing/selftests/kvm/x86_64/hyperv_ipi.c +++ b/tools/testing/selftests/kvm/x86_64/hyperv_ipi.c @@ -248,6 +248,8 @@ int main(int argc, char *argv[]) int stage = 1, r; struct ucall uc; + TEST_REQUIRE(kvm_has_cap(KVM_CAP_HYPERV_SEND_IPI)); + vm = vm_create_with_one_vcpu(&vcpu[0], sender_guest_code); /* Hypercall input/output */ |