Re: [PATCH v3 07/10] KVM: s390: Return -EINTR if a signal was pending while faulting-in
From: Claudio Imbrenda
Date: Tue Jul 28 2026 - 11:04:37 EST
On Tue, 28 Jul 2026 16:28:38 +0200
Janosch Frank <frankja@xxxxxxxxxxxxx> wrote:
> On 7/27/26 17:02, Claudio Imbrenda wrote:
> > If a signal is pending while trying to fault-in a page, return -EINTR
> > instead of -EAGAIN.
> >
> > Signed-off-by: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx>
> > Fixes: e907ae530133 ("KVM: s390: Add helper functions for fault handling")
> > ---
> > arch/s390/kvm/faultin.c | 4 ++--
> > arch/s390/kvm/intercept.c | 18 ++++++++----------
> > arch/s390/kvm/pv.c | 2 +-
> > 3 files changed, 11 insertions(+), 13 deletions(-)
> >
> > diff --git a/arch/s390/kvm/faultin.c b/arch/s390/kvm/faultin.c
> > index fee80047bd94..4ff4c5970956 100644
> > --- a/arch/s390/kvm/faultin.c
> > +++ b/arch/s390/kvm/faultin.c
> > @@ -92,8 +92,8 @@ int kvm_s390_faultin_gfn(struct kvm_vcpu *vcpu, struct kvm *kvm, struct guest_fa
> > if (is_noslot_pfn(f->pfn))
> > return PGM_ADDRESSING;
> > /* Signal pending: try again. */
> > - if (f->pfn == KVM_PFN_ERR_SIGPENDING)
> > - return -EAGAIN;
> > + if (is_sigpending_pfn(f->pfn))
> > + return -EINTR;
> > /* Check if it's read-only memory; don't try to actually handle that case. */
> > if (f->pfn == KVM_PFN_ERR_RO_FAULT)
> > return -EOPNOTSUPP;
>
> The code above is what I'd expect from the description but there's more
> code in this patch. Are we fixing multiple things?
I'm also fixing the callers that would not deal with -EINTR properly;
I'll fix the patch description accordingly
[...]