[PATCH v7 21/23] KVM: s390: arm64: Implement vCPU IOCTLs

Steffen Eiden seiden at linux.ibm.com
Wed Sep 16 08:00:01 PDT 2026


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 at linux.ibm.com>
> > Signed-off-by: Andreas Grapentin <gra at linux.ibm.com>
> > Co-developed-by: Nina Schoetterl-Glausch <nsg at linux.ibm.com>
> > Signed-off-by: Nina Schoetterl-Glausch <nsg at linux.ibm.com>
> > Signed-off-by: Steffen Eiden <seiden at linux.ibm.com>
> > ---
> 
> [...]
> 
> > +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



More information about the linux-arm-kernel mailing list