[PATCH v4 08/27] KVM: arm64: Prepare sharing arm64 code with s390
Steffen Eiden
seiden at linux.ibm.com
Tue Jul 7 00:20:57 PDT 2026
On Mon, Jul 06, 2026 at 10:28:37PM +0100, Marc Zyngier wrote:
> On Mon, 06 Jul 2026 09:52:08 +0100,
> Steffen Eiden <seiden at linux.ibm.com> wrote:
...
> > /*
> > * Return > 0 to return to guest, < 0 on error, 0 (and set exit_reason) on
> > * proper exit to userspace.
> > diff --git a/arch/arm64/kvm/mmio.c b/arch/arm64/kvm/mmio.c
> > index e2285ed8c91d..876d56dd5b64 100644
> > --- a/arch/arm64/kvm/mmio.c
> > +++ b/arch/arm64/kvm/mmio.c
> > @@ -10,6 +10,7 @@
> >
> > #include "trace.h"
> >
> > +#ifdef ARM64_S390_COMMON
> > void kvm_mmio_write_buf(void *buf, unsigned int len, unsigned long data)
> > {
> > void *datap = NULL;
> > @@ -135,8 +136,11 @@ int kvm_handle_mmio_return(struct kvm_vcpu *vcpu)
> > if (!kvm_vcpu_dabt_issf(vcpu))
> > data = data & 0xffffffff;
> >
> > +#endif /* ARM64_S390_COMMON */
> > trace_kvm_mmio(KVM_TRACE_MMIO_READ, len, run->mmio.phys_addr,
> > &data);
> > + //TODO tracing
> > +#ifdef ARM64_S390_COMMON
>
> Irk. The deal is that you lift full functions, not cherry-pick which
> lines you want. Just define empty stubs for the trace nonsense, and be
> done with it. But not this, please!
>
Sorry, this dirty hack is a leftover I forgot to clean up prior to sending.
Hence the TODO.
I definitely second you full functions or not at all should be the approach.
Everything else is not maintainable.
I will add the tracing stuff for the next round.
Steffen
More information about the linux-arm-kernel
mailing list