KVM: selftests: Make memslot_perf_test arch independent
authorRicardo Koller <ricarkol@google.com>
Tue, 7 Sep 2021 18:09:56 +0000 (11:09 -0700)
committerMarc Zyngier <maz@kernel.org>
Thu, 21 Oct 2021 10:36:34 +0000 (11:36 +0100)
commitffb4ce3c49366f02f1c064fbe2e66a96ab5f98b8
tree403af3fb6cac4bde2432177a2a01637cf52fbb41
parent9e1ff307c779ce1f0f810c7ecce3d95bbae40896
KVM: selftests: Make memslot_perf_test arch independent

memslot_perf_test uses ucalls for synchronization between guest and
host. Ucalls API is architecture independent: tests do not need to know
details like what kind of exit they generate on a specific arch.  More
specifically, there is no need to check whether an exit is KVM_EXIT_IO
in x86 for the host to know that the exit is ucall related, as
get_ucall() already makes that check.

Change memslot_perf_test to not require specifying what exit does a
ucall generate. Also add a missing ucall_init.

Signed-off-by: Ricardo Koller <ricarkol@google.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Oliver Upton <oupton@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210907180957.609966-2-ricarkol@google.com
tools/testing/selftests/kvm/memslot_perf_test.c