summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/kvm/lib/kvm_util.c
diff options
context:
space:
mode:
authorVipin Sharma <vipinsh@google.com>2022-12-12 10:37:20 -0800
committerSean Christopherson <seanjc@google.com>2023-02-01 14:31:27 -0800
commit60325261235accc838158c82b403086e0e76e6a9 (patch)
tree3b5b42e20292e7e25690964cfba5ed886e704c54 /tools/testing/selftests/kvm/lib/kvm_util.c
parentf65092015a83348fdc2f509e4ad8278e0c2df0cd (diff)
downloadlinux-60325261235accc838158c82b403086e0e76e6a9.tar.gz
linux-60325261235accc838158c82b403086e0e76e6a9.tar.bz2
linux-60325261235accc838158c82b403086e0e76e6a9.zip
KVM: selftests: Test Hyper-V extended hypercall exit to userspace
Hyper-V extended hypercalls by default exit to userspace. Verify userspace gets the call, update the result and then verify in guest correct result is received. Add KVM_EXIT_HYPERV to list of "known" hypercalls so errors generate pretty strings. Signed-off-by: Vipin Sharma <vipinsh@google.com> Reviewed-by: David Matlack <dmatlack@google.com> Link: https://lore.kernel.org/r/20221212183720.4062037-14-vipinsh@google.com [sean: add KVM_EXIT_HYPERV to exit_reasons_known] Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/testing/selftests/kvm/lib/kvm_util.c')
-rw-r--r--tools/testing/selftests/kvm/lib/kvm_util.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/kvm/lib/kvm_util.c b/tools/testing/selftests/kvm/lib/kvm_util.c
index 56d5ea949cbb..f25b3e9b5a07 100644
--- a/tools/testing/selftests/kvm/lib/kvm_util.c
+++ b/tools/testing/selftests/kvm/lib/kvm_util.c
@@ -1844,6 +1844,7 @@ static struct exit_reason {
{KVM_EXIT_X86_RDMSR, "RDMSR"},
{KVM_EXIT_X86_WRMSR, "WRMSR"},
{KVM_EXIT_XEN, "XEN"},
+ {KVM_EXIT_HYPERV, "HYPERV"},
#ifdef KVM_EXIT_MEMORY_NOT_PRESENT
{KVM_EXIT_MEMORY_NOT_PRESENT, "MEMORY_NOT_PRESENT"},
#endif