Skip to content

Commit

Permalink
KVM: selftests: Don't set reserved bits for invalid Hyper-V hypercall…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
Vitaly Kuznetsov authored and Sean Christopherson committed Sep 28, 2022
1 parent dfb45db commit 31d3b87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/kvm/x86_64/hyperv_features.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 31d3b87

Please sign in to comment.