linux/arch/s390/mm
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
..
cmm.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
dump_pagetables.c mm/ptdump: take the memory hotplug lock inside ptdump_walk_pgd() 2025-07-09 22:42:20 -07:00
extable.c s390/uaccess: Shorten raw_copy_from_user() / raw_copy_to_user() inline assemblies 2025-03-04 17:18:03 +01:00
extmem.c s390/extmem: Add workaround for DCSS unload diag 2025-05-17 10:55:00 +02:00
fault.c more s390 updates for 6.16 merge window 2025-06-06 18:02:37 -07:00
gmap.c s390: Explicitly include <linux/export.h> 2025-06-17 18:18:02 +02:00
gmap_helpers.c KVM: s390: Fix to clear PTE when discarding a swapped page 2025-10-19 16:37:18 +02:00
hugetlbpage.c s390 updates for 6.15 merge window 2025-03-29 11:59:43 -07:00
init.c s390: Handle KCOV __init vs inline mismatches 2025-07-21 21:44:01 -07:00
maccess.c s390: Remove __bootdata annotations from declarations 2024-12-15 16:19:04 +01:00
Makefile KVM: s390: Refactor and split some gmap helpers 2025-05-28 17:48:04 +02:00
mmap.c s390/mm: Simplify gap clamping in mmap_base() using clamp() 2025-03-04 17:18:08 +01:00
page-states.c s390/cmma: rework no-dat handling 2023-11-05 22:34:58 +01:00
pageattr.c s390/cpufeature: Convert MACHINE_HAS_IDTE to cpu_has_idte() 2025-03-04 17:18:05 +01:00
pfault.c s390/asm-offsets: Remove ASM_OFFSETS_C 2025-03-31 12:20:39 +02:00
pgalloc.c s390/mm: Remove possible false-positive warning in pte_free_defer() 2025-07-23 18:06:32 +02:00
pgtable.c KVM: s390: Fix to clear PTE when discarding a swapped page 2025-10-19 16:37:18 +02:00
physaddr.c s390/mm: provide simple ARCH_HAS_DEBUG_VIRTUAL support 2024-03-13 09:23:49 +01:00
vmem.c s390/mm: Allocate page table with PAGE_SIZE granularity 2025-08-05 14:23:20 +02:00