linux/arch/s390/include
Gautam Gala 919efcadb6 KVM: s390: Fix to clear PTE when discarding a swapped page
commit 5deafa27d9 upstream.

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: 200197908d ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-10-19 16:37:18 +02:00
..
asm KVM: s390: Fix to clear PTE when discarding a swapped page 2025-10-19 16:37:18 +02:00
uapi/asm s390: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers 2025-06-16 16:23:02 +02:00