Skip to content
Snippets Groups Projects
Commit 76f972c2 authored by Mark Brown's avatar Mark Brown Committed by Paolo Bonzini
Browse files

KVM: selftests: Fix build on architectures other than x86_64


The recent addition of support for testing with the x86 specific quirk
KVM_X86_QUIRK_SLOT_ZAP_ALL disabled in the generic memslot tests broke the
build of the KVM selftests for all other architectures:

In file included from include/kvm_util.h:8,
                 from include/memstress.h:13,
                 from memslot_modification_stress_test.c:21:
memslot_modification_stress_test.c: In function ‘main’:
memslot_modification_stress_test.c:176:38: error: ‘KVM_X86_QUIRK_SLOT_ZAP_ALL’ undeclared (first use in this function)
  176 |                                      KVM_X86_QUIRK_SLOT_ZAP_ALL);
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~

Add __x86_64__ guard defines to avoid building the relevant code on other
architectures.

Fixes: 61de4c34 ("KVM: selftests: Test memslot move in memslot_perf_test with quirk disabled")
Fixes: 218f6415 ("KVM: selftests: Allow slot modification stress test with quirk disabled")
Reported-by: default avatarAishwarya TCV <aishwarya.tcv@arm.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Message-ID: <20240930-kvm-build-breakage-v1-1-866fad3cc164@kernel.org>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent efbc6bd0
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment