OSDN Git Service

KVM: selftests: Add arch ucall.h and inline simple arch hooks
authorSean Christopherson <seanjc@google.com>
Mon, 31 Jul 2023 20:30:24 +0000 (13:30 -0700)
committerSean Christopherson <seanjc@google.com>
Wed, 2 Aug 2023 21:42:52 +0000 (14:42 -0700)
commitb35f4c73d389d3b04e5edf3d1fd041ed3070228b
tree7597da77d5581d04b68f8bf3f96013442bd0d5c1
parent289c2b4db8f336b96d918eb0c548382aee71ed79
KVM: selftests: Add arch ucall.h and inline simple arch hooks

Add an architecture specific ucall.h and inline the simple arch hooks,
e.g. the init hook for everything except ARM, and the actual "do ucall"
hook for everything except x86 (which should be simple, but temporarily
isn't due to carrying a workaround).

Having a per-arch ucall header will allow adding a #define for the
expected KVM exit reason for a ucall that is colocated (for everything
except x86) with the ucall itself.

Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Link: https://lore.kernel.org/r/20230731203026.1192091-2-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/include/aarch64/ucall.h [new file with mode: 0644]
tools/testing/selftests/kvm/include/riscv/ucall.h [new file with mode: 0644]
tools/testing/selftests/kvm/include/s390x/ucall.h [new file with mode: 0644]
tools/testing/selftests/kvm/include/ucall_common.h
tools/testing/selftests/kvm/include/x86_64/ucall.h [new file with mode: 0644]
tools/testing/selftests/kvm/lib/aarch64/ucall.c
tools/testing/selftests/kvm/lib/riscv/ucall.c
tools/testing/selftests/kvm/lib/s390x/ucall.c
tools/testing/selftests/kvm/lib/x86_64/ucall.c