From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Claudio Imbrenda <imbrenda@linux.ibm.com>, linux-kernel@vger.kernel.org
Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org,
frankja@linux.ibm.com, david@kernel.org, seiden@linux.ibm.com,
nrb@linux.ibm.com, schlameuss@linux.ibm.com, gra@linux.ibm.com,
hca@linux.ibm.com, gerald.schaefer@linux.ibm.com,
gor@linux.ibm.com, agordeev@linux.ibm.com, svens@linux.ibm.com
Subject: Re: [PATCH v4 5/7] KVM: s390: Fix handle_{sske,pfmf} under memory pressure
Date: Mon, 22 Jun 2026 13:44:05 +0200 [thread overview]
Message-ID: <81a58478-6a39-4bdf-84a0-5da4d29b6407@de.ibm.com> (raw)
In-Reply-To: <20260619155154.307572-6-imbrenda@linux.ibm.com>
Am 19.06.26 um 17:51 schrieb Claudio Imbrenda:
> Under heavy memory pressure, handle_sske() and handle_pfmf() might
> cause an endless loop if the mmu cache runs empty, the atomic
> allocations fail, and the top-up function also fails. While quite
> unlikely, that scenario is not impossible.
>
> Fix the issue by not ignoring the return value of
> kvm_s390_mmu_cache_topup(), and appropriately returning an error code
> in case of failure.
>
> Fixes: e38c884df921 ("KVM: s390: Switch to new gmap")
> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>
> ---
> arch/s390/kvm/priv.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c
> index 447ec7ed423d..9bc6fd02ff77 100644
> --- a/arch/s390/kvm/priv.c
> +++ b/arch/s390/kvm/priv.c
> @@ -366,7 +366,9 @@ static int handle_sske(struct kvm_vcpu *vcpu)
> if (rc > 1)
> return kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING);
> if (rc == -ENOMEM) {
> - kvm_s390_mmu_cache_topup(vcpu->arch.mc);
> + rc = kvm_s390_mmu_cache_topup(vcpu->arch.mc);
> + if (rc)
> + return rc;
> continue;
> }
> if (rc < 0)
> @@ -1122,7 +1124,9 @@ static int handle_pfmf(struct kvm_vcpu *vcpu)
> if (rc > 1)
> return kvm_s390_inject_program_int(vcpu, rc);
> if (rc == -ENOMEM) {
> - kvm_s390_mmu_cache_topup(vcpu->arch.mc);
> + rc = kvm_s390_mmu_cache_topup(vcpu->arch.mc);
> + if (rc)
> + return rc;
> continue;
> }
> if (rc < 0)
next prev parent reply other threads:[~2026-06-22 11:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-19 15:51 [PATCH v4 0/7] KVM: s390: A bunch of gmap-related fixes Claudio Imbrenda
2026-06-19 15:51 ` [PATCH v4 1/7] s390/mm: Fix handling of _PAGE_UNUSED pte bit Claudio Imbrenda
2026-06-19 15:51 ` [PATCH v4 2/7] KVM: s390: Fix dat_peek_cmma() overflow Claudio Imbrenda
2026-06-19 15:51 ` [PATCH v4 3/7] KVM: s390: Do not set special large pages dirty Claudio Imbrenda
2026-06-19 15:51 ` [PATCH v4 4/7] KVM: s390: Fix code typo in gmap_protect_asce_top_level() Claudio Imbrenda
2026-06-19 15:51 ` [PATCH v4 5/7] KVM: s390: Fix handle_{sske,pfmf} under memory pressure Claudio Imbrenda
2026-06-22 11:44 ` Christian Borntraeger [this message]
2026-06-19 15:51 ` [PATCH v4 6/7] KVM: s390: cmma: Fix cmma dirty tracking Claudio Imbrenda
2026-06-19 15:51 ` [PATCH v4 7/7] KVM: s390: selftests: Fix cmma selftest Claudio Imbrenda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=81a58478-6a39-4bdf-84a0-5da4d29b6407@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=david@kernel.org \
--cc=frankja@linux.ibm.com \
--cc=gerald.schaefer@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=gra@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=nrb@linux.ibm.com \
--cc=schlameuss@linux.ibm.com \
--cc=seiden@linux.ibm.com \
--cc=svens@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®