Re: [PATCH v7 11/23] KVM: arm64: Share arm64 code with s390
From: Steffen Eiden
Date: Tue Sep 15 2026 - 11:21:04 EST
On Sat, Sep 12, 2026 at 12:43:28PM +0100, Marc Zyngier wrote:
> On Wed, 02 Sep 2026 13:41:52 +0100,
> Steffen Eiden <seiden@xxxxxxxxxxxxx> wrote:
>
> [...]
>
> > So my suggestion is:
> >
> > For series 1 (and 2) s390 has its own, local implementation of
> > handle_exit without sharing any code with arm64 in regard to EC
> >
> > When s390 has all the relevant code available (likely series 3) s390 can
> > switch to using most (if not all) EC handling code used by
> > arm_exit_handlers implemented in handle_exit.c.
> >
> > This can be done without a mixed patch:
> >
> > 1. Mark arm64 handle_exit.c as shared (roughly the first 400Loc w/o
> > includes) - s390 will not use it after this patch.
> > 2. remove the handle exit code from s390's handle_exit.c and include the
> > new generated handle_exit.inc
> >
> > This approach brings us further into the share architecture not only code
> > approach you meantrioned in the comments regarding sys-regs. (I or
> > Andreas will provide a solution for this later :) )
> >
> > Is that OK with you, what do you think?
>
> I *think* that's OK. I just want to make sure that in the long run, we
> don't end-up with pointless divergence.
>
Yes, that is what I want to avoid as well. I want like to share as much
architecture code/concepts as possible while keeping the churn as low as
possible.
Steffen