[PATCH v3 3/6] KVM: PPC: selftests: add support for powerpc
Sean Christopherson
seanjc at google.com
Thu Aug 3 08:44:32 AEST 2023
On Thu, Jun 08, 2023, Nicholas Piggin wrote:
> diff --git a/tools/testing/selftests/kvm/lib/powerpc/ucall.c b/tools/testing/selftests/kvm/lib/powerpc/ucall.c
> new file mode 100644
> index 000000000000..ce0ddde45fef
> --- /dev/null
> +++ b/tools/testing/selftests/kvm/lib/powerpc/ucall.c
> @@ -0,0 +1,30 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * ucall support. A ucall is a "hypercall to host userspace".
> + */
> +#include "kvm_util.h"
> +#include "hcall.h"
> +
> +void ucall_arch_init(struct kvm_vm *vm, vm_paddr_t mmio_gpa)
> +{
> +}
> +
> +void ucall_arch_do_ucall(vm_vaddr_t uc)
> +{
> + hcall2(H_UCALL, UCALL_R4_UCALL, (uintptr_t)(uc));
> +}
FYI, the ucall stuff will silently conflict with treewide (where KVM selftests is
the treechanges that I've queued[*]. It probably makes sense for the initial PPC
support to go through the KVM tree anyways, so I'd be more than happy to grab this
series via kvm-x86/selftests if you're willing to do the code changes (should be
minor, knock wood). Alternatively, the immutable tag I'm planning on creating
could be merged into the PPC tree, but that seems like overkill.
Either way, please Cc me on the next version (assuming there is a next version),
if only so that I can give you an early heads up if/when the next treewide change
alongs ;-)
[*] https://lore.kernel.org/all/169101267140.1755771.17089576255751273053.b4-ty@google.com
More information about the Linuxppc-dev
mailing list