selftests/kvm: fix compilation on non-x86_64 platforms
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 21 Nov 2023 16:24:08 +0000 (11:24 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 21 Nov 2023 16:58:25 +0000 (11:58 -0500)
commite9e60c82fe391d04db55a91c733df4a017c28b2f
treed8c4917325c24342046d0868e2fdbc1e07e6519f
parent6c370dc65374db5afbc5c6c64c662f922a2555ad
selftests/kvm: fix compilation on non-x86_64 platforms

MEM_REGION_SLOT and MEM_REGION_GPA are not really needed in
test_invalid_memory_region_flags; the VM never runs and there are no
other slots, so it is okay to use slot 0 and place it at address
zero.  This fixes compilation on architectures that do not
define them.

Fixes: 5d74316466f4 ("KVM: selftests: Add a memory region subtest to validate invalid flags")
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/guest_memfd_test.c
tools/testing/selftests/kvm/set_memory_region_test.c