Re: [PATCH v7 21/23] KVM: s390: arm64: Implement vCPU IOCTLs
From: Steffen Eiden
Date: Wed Sep 16 2026 - 11:08:09 EST
On Thu, Sep 03, 2026 at 03:27:16PM +0200, Janosch Frank wrote:
> On 8/31/26 4:47 PM, Steffen Eiden wrote:
> > Implement all required vCPU (arch) IOCTLs.
> >
> > Co-developed-by: Andreas Grapentin <gra@xxxxxxxxxxxxx>
> > Signed-off-by: Andreas Grapentin <gra@xxxxxxxxxxxxx>
> > Co-developed-by: Nina Schoetterl-Glausch <nsg@xxxxxxxxxxxxx>
> > Signed-off-by: Nina Schoetterl-Glausch <nsg@xxxxxxxxxxxxx>
> > Signed-off-by: Steffen Eiden <seiden@xxxxxxxxxxxxx>
> > ---
>
> [...]
>
> > +static void arm_vcpu_run(struct kvm_vcpu *vcpu)
> > +{
> > + struct kvm_sae_block *sae_block = &vcpu->arch.sae_block;
> > +
> > + adjust_pc(vcpu);
> > +
> > + local_irq_disable();
> > + guest_timing_enter_irqoff();
> > + guest_state_enter_irqoff();
> > + local_irq_enable();
> > +
> > + sae_block->icptr = 0;
>
> We already do that in the function below, no?
> If possible I'd like to avoid setting ictpr here.
>
yes, removed it at this location. thanks.
...
> > + kvm_vcpu_srcu_read_unlock(vcpu);
> > +
> > + arm_vcpu_run(vcpu);
> > +
> > + vcpu->mode = OUTSIDE_GUEST_MODE;
> > +
> > + kvm_vcpu_srcu_read_lock(vcpu);
> > +
> > + ret = handle_exit(vcpu);
>
> ARM increases stat.exits here and since you copied the stat fields over we
> could do that too.
Good catch, thanks. Adding the stat.
>
> General question to the ARM maintainers:
> We'll be adding more stat fields in the very soon future.
> Are you fine with us adding them under any name or should we prefix them so
> it's clear they exist because of our architecture / implementation and will
> likely never be added to ARM KVM?
>
> In the past we've added a lot of stats and I'd expect us to at least add
> stats for every intercept reason.
That is the exact reason I copied the struct and not reuse the arm64
defenition. I already added a gmap stat we have but native arm not.
If the stat is meaningfull I am all for adding the stat to arm as well.
Steffen