linux/tools/testing/selftests/kvm/include
Andrew Jones 577e022b7b selftests: KVM: Fix non-x86 compiling
Attempting to compile on a non-x86 architecture fails with

include/kvm_util.h: In function ‘vm_compute_max_gfn’:
include/kvm_util.h:79:21: error: dereferencing pointer to incomplete type ‘struct kvm_vm’
  return ((1ULL << vm->pa_bits) >> vm->page_shift) - 1;
                     ^~

This is because the declaration of struct kvm_vm is in
lib/kvm_util_internal.h as an effort to make it private to
the test lib code. We can still provide arch specific functions,
though, by making the generic function symbols weak. Do that to
fix the compile error.

Fixes: c8cc43c1ea ("selftests: KVM: avoid failures due to reserved HyperTransport region")
Cc: stable@vger.kernel.org
Signed-off-by: Andrew Jones <drjones@redhat.com>
Message-Id: <20211214151842.848314-1-drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-12-20 08:06:54 -05:00
..
aarch64 KVM: arm64: selftests: Add host support for vGIC 2021-10-17 11:17:21 +01:00
s390x KVM: selftests: sync_regs test for diag318 2020-12-10 13:36:05 +01:00
x86_64 selftest: KVM: Add open sev dev helper 2021-11-11 10:35:27 -05:00
guest_modes.h KVM: selftests: Factor out guest mode code 2021-01-07 18:07:29 -05:00
kvm_util.h selftests: KVM: Fix non-x86 compiling 2021-12-20 08:06:54 -05:00
numaif.h KVM: selftests: Add missing header file needed by xAPIC IPI tests 2021-02-11 08:02:08 -05:00
perf_test_util.h KVM: selftests: Move vCPU thread creation and joining to common helpers 2021-11-16 07:43:28 -05:00
sparsebit.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 482 2019-06-19 17:09:52 +02:00
test_util.h KVM: selftests: Assert mmap HVA is aligned when using HugeTLB 2021-11-16 07:43:25 -05:00