Re: [PATCH v4.1 1/3] KVM: selftests: Add arch ucall.h and inline simple arch hooks

From: Andrew Jones
Date: Tue Aug 01 2023 - 05:23:28 EST


On Mon, Jul 31, 2023 at 01:30:24PM -0700, Sean Christopherson wrote:
> 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.
>
> Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
> ---
> .../selftests/kvm/include/aarch64/ucall.h | 18 ++++++++++++++++++
> .../selftests/kvm/include/riscv/ucall.h | 18 ++++++++++++++++++
> .../selftests/kvm/include/s390x/ucall.h | 17 +++++++++++++++++
> .../selftests/kvm/include/ucall_common.h | 1 +
> .../selftests/kvm/include/x86_64/ucall.h | 11 +++++++++++
> .../testing/selftests/kvm/lib/aarch64/ucall.c | 11 +----------
> tools/testing/selftests/kvm/lib/riscv/ucall.c | 11 -----------
> tools/testing/selftests/kvm/lib/s390x/ucall.c | 10 ----------
> tools/testing/selftests/kvm/lib/x86_64/ucall.c | 4 ----
> 9 files changed, 66 insertions(+), 35 deletions(-)
> create mode 100644 tools/testing/selftests/kvm/include/aarch64/ucall.h
> create mode 100644 tools/testing/selftests/kvm/include/riscv/ucall.h
> create mode 100644 tools/testing/selftests/kvm/include/s390x/ucall.h
> create mode 100644 tools/testing/selftests/kvm/include/x86_64/ucall.h
>

Reviewed-by: Andrew Jones <ajones@xxxxxxxxxxxxxxxx>