Re: [PATCH v3 3/3] KVM: s390: Introducing kvm_arch_set_irq_inatomic fast inject

From: Matthew Rosato

Date: Mon Apr 06 2026 - 12:25:33 EST



>
> -static void __kvm_inject_pfault_token(struct kvm_vcpu *vcpu, bool start_token,
> - unsigned long token)
> +static int __kvm_inject_pfault_token(struct kvm_vcpu *vcpu, bool start_token,
> + unsigned long token)
> {
> struct kvm_s390_interrupt inti;
> struct kvm_s390_irq irq;
> + struct kvm_s390_interrupt_info *inti_mem;
> +
> + inti_mem = kzalloc_obj(*inti_mem, GFP_KERNEL_ACCOUNT);
> + if (!inti_mem)
> + return -ENOMEM;

You change this function to possibly return this value but you do not
change the callers of this routine to actually look at the new return value?

AFAICT there are 2 callers of this today in arch/s390/kvm/kvm-s390.c - I
assume one or both need updating, otherwise why do we need this change?

>
> if (start_token) {
> irq.u.ext.ext_params2 = token;
> @@ -4409,8 +4422,9 @@ static void __kvm_inject_pfault_token(struct kvm_vcpu *vcpu, bool start_token,
> } else {
> inti.type = KVM_S390_INT_PFAULT_DONE;
> inti.parm64 = token;
> - WARN_ON_ONCE(kvm_s390_inject_vm(vcpu->kvm, &inti));
> + WARN_ON_ONCE(kvm_s390_inject_vm(vcpu->kvm, &inti, inti_mem));
> }
> + return true;

Since return value is an integer, return 0?