summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2022-02-17 10:21:36 -0800
committerPaolo Bonzini <pbonzini@redhat.com>2022-06-11 10:20:02 -0400
commit2de1b7b127da0e87d278af172fa37ebfe04c8675 (patch)
tree6aed502c29f145539fc2026b7e4d574531a3b552 /tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c
parent10825b55b9d5a402294095a3d5fc9d0ea39cc282 (diff)
downloadlinux-next-2de1b7b127da0e87d278af172fa37ebfe04c8675.tar.gz
linux-next-2de1b7b127da0e87d278af172fa37ebfe04c8675.zip
KVM: selftests: Make kvm_ioctl() a wrapper to pretty print ioctl name
Make kvm_ioctl() a macro wrapper and print the _name_ of the ioctl on failure instead of the number. Deliberately do not use __stringify(), as that will expand the ioctl all the way down to its numerical sequence, again the intent is to print the name of the macro. Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c')
-rw-r--r--tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c b/tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c
index 7e45a3df8f98..896e1e7c1df7 100644
--- a/tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c
+++ b/tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c
@@ -123,7 +123,7 @@ void test_hv_cpuid_e2big(struct kvm_vm *vm, bool system)
if (!system)
ret = __vcpu_ioctl(vm, VCPU_ID, KVM_GET_SUPPORTED_HV_CPUID, &cpuid);
else
- ret = __kvm_ioctl(vm, KVM_GET_SUPPORTED_HV_CPUID, &cpuid);
+ ret = __kvm_ioctl(vm_get_kvm_fd(vm), KVM_GET_SUPPORTED_HV_CPUID, &cpuid);
TEST_ASSERT(ret == -1 && errno == E2BIG,
"%s KVM_GET_SUPPORTED_HV_CPUID didn't fail with -E2BIG when"