aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/kvm
diff options
context:
space:
mode:
authorVitaly Kuznetsov <vkuznets@redhat.com>2022-09-22 10:39:41 +0200
committerSean Christopherson <seanjc@google.com>2022-09-28 12:47:20 -0700
commit31d3b871f5ee9b195d90b4d14b74a7864209c6e8 (patch)
tree328559826fbc4770ef10b1ea23c1273f5a69237b /tools/testing/selftests/kvm
parentKVM: selftests: Load RAX with -EFAULT before Hyper-V hypercall (diff)
downloadlinux-dev-31d3b871f5ee9b195d90b4d14b74a7864209c6e8.tar.xz
linux-dev-31d3b871f5ee9b195d90b4d14b74a7864209c6e8.zip
KVM: selftests: Don't set reserved bits for invalid Hyper-V hypercall number
Bits 27 through 31 in Hyper-V hypercall 'control' are reserved (see HV_HYPERCALL_RSVD0_MASK) but '0xdeadbeef' includes them. This causes KVM to return HV_STATUS_INVALID_HYPERCALL_INPUT instead of the expected HV_STATUS_INVALID_HYPERCALL_CODE. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Link: https://lore.kernel.org/all/87fsgjol20.fsf@redhat.com Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/testing/selftests/kvm')
-rw-r--r--tools/testing/selftests/kvm/x86_64/hyperv_features.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/kvm/x86_64/hyperv_features.c b/tools/testing/selftests/kvm/x86_64/hyperv_features.c
index 4d55e038c2d7..05b32e550a80 100644
--- a/tools/testing/selftests/kvm/x86_64/hyperv_features.c
+++ b/tools/testing/selftests/kvm/x86_64/hyperv_features.c
@@ -508,7 +508,7 @@ static void guest_test_hcalls_access(void)
switch (stage) {
case 0:
feat->eax |= HV_MSR_HYPERCALL_AVAILABLE;
- hcall->control = 0xdeadbeef;
+ hcall->control = 0xbeef;
hcall->expect = HV_STATUS_INVALID_HYPERCALL_CODE;
break;