OSDN Git Service

KVM: selftests: Split ucall.c into architecture specific files
authorThomas Huth <thuth@redhat.com>
Wed, 31 Jul 2019 15:15:23 +0000 (17:15 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Fri, 2 Aug 2019 13:44:16 +0000 (15:44 +0200)
commit2040f414d12f31be3e73eb3f5048d2b1cdec48f6
treeaf9dc108dd87d9fd66216892aeed2fd5bac66ec9
parent609488bc979f99f805f34e9a32c1e3b71179d10b
KVM: selftests: Split ucall.c into architecture specific files

The way we exit from a guest to userspace is very specific to the
architecture: On x86, we use PIO, on aarch64 we are using MMIO and on
s390x we're going to use an instruction instead. The possibility to
select a type via the ucall_type_t enum is currently also completely
unused, so the code in ucall.c currently looks more complex than
required. Let's split this up into architecture specific ucall.c
files instead, so we can get rid of the #ifdefs and the unnecessary
ucall_type_t handling.

Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Link: https://lore.kernel.org/r/20190731151525.17156-2-thuth@redhat.com
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
tools/testing/selftests/kvm/Makefile
tools/testing/selftests/kvm/dirty_log_test.c
tools/testing/selftests/kvm/include/kvm_util.h
tools/testing/selftests/kvm/lib/aarch64/ucall.c [new file with mode: 0644]
tools/testing/selftests/kvm/lib/ucall.c [deleted file]
tools/testing/selftests/kvm/lib/x86_64/ucall.c [new file with mode: 0644]