]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: s390: Fix to clear PTE when discarding a swapped page
authorGautam Gala <ggala@linux.ibm.com>
Wed, 24 Sep 2025 11:26:44 +0000 (13:26 +0200)
committerClaudio Imbrenda <imbrenda@linux.ibm.com>
Tue, 30 Sep 2025 13:58:30 +0000 (15:58 +0200)
commit5deafa27d9ae040b75d392f60b12e300b42b4792
tree8171f615eceb121afc3184ba3b367e127d21d326
parent352ccf890a3e91f58bc32503f9afdc161bc2c34a
KVM: s390: Fix to clear PTE when discarding a swapped page

KVM run fails when guests with 'cmm' cpu feature and host are
under memory pressure and use swap heavily. This is because
npages becomes ENOMEN (out of memory) in hva_to_pfn_slow()
which inturn propagates as EFAULT to qemu. Clearing the page
table entry when discarding an address that maps to a swap
entry resolves the issue.

Fixes: 200197908dc4 ("KVM: s390: Refactor and split some gmap helpers")
Cc: stable@vger.kernel.org
Suggested-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Signed-off-by: Gautam Gala <ggala@linux.ibm.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
arch/s390/include/asm/pgtable.h
arch/s390/mm/gmap_helpers.c
arch/s390/mm/pgtable.c