From a9c788f07347cf5dfcbe4bf77bf0f3a2a04c89f1 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Thu, 23 May 2019 18:43:02 +0200 Subject: KVM: selftests: Guard struct kvm_vcpu_events with __KVM_HAVE_VCPU_EVENTS The struct kvm_vcpu_events code is only available on certain architectures (arm, arm64 and x86). To be able to compile kvm_util.c also for other architectures, we have to fence the code with __KVM_HAVE_VCPU_EVENTS. Reviewed-by: David Hildenbrand Reviewed-by: Andrew Jones Signed-off-by: Thomas Huth Message-Id: <20190523164309.13345-3-thuth@redhat.com> Signed-off-by: Christian Borntraeger --- tools/testing/selftests/kvm/include/kvm_util.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools/testing/selftests/kvm/include') diff --git a/tools/testing/selftests/kvm/include/kvm_util.h b/tools/testing/selftests/kvm/include/kvm_util.h index a5a4b28f14d8..b8bf961074fe 100644 --- a/tools/testing/selftests/kvm/include/kvm_util.h +++ b/tools/testing/selftests/kvm/include/kvm_util.h @@ -114,10 +114,12 @@ void vcpu_sregs_set(struct kvm_vm *vm, uint32_t vcpuid, struct kvm_sregs *sregs); int _vcpu_sregs_set(struct kvm_vm *vm, uint32_t vcpuid, struct kvm_sregs *sregs); +#ifdef __KVM_HAVE_VCPU_EVENTS void vcpu_events_get(struct kvm_vm *vm, uint32_t vcpuid, struct kvm_vcpu_events *events); void vcpu_events_set(struct kvm_vm *vm, uint32_t vcpuid, struct kvm_vcpu_events *events); +#endif #ifdef __x86_64__ void vcpu_nested_state_get(struct kvm_vm *vm, uint32_t vcpuid, struct kvm_nested_state *state); -- cgit v1.2.3-59-g8ed1b