mirror-linux/arch/s390/kvm
Claudio Imbrenda 9029496abf KVM: s390: Properly reset zero bit in PGSTE
In case of memory pressure, it's possible that a guest page gets freed
and then almost immediately reused by the guest. If CMMA is enabled,
_essa_clear_cbrl() will discard all pages that are either unused or
zero. If a discarded page is reused before _essa_clear_cbrl() is called,
and the pgste.zero bit is not cleared, the page will be discarded
despite not being unused.

When calling _gmap_ptep_xchg(), always clear the pgste.zero bit. This
prevents the page from being accidentally discarded when not unused.

Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Fixes: a2c17f9270 ("KVM: s390: New gmap code")
Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com>
2026-05-22 11:25:11 +02:00
..
Kconfig KVM: remove CONFIG_KVM_GENERIC_MMU_NOTIFIER 2026-02-28 15:31:35 +01:00
Makefile KVM: s390: Switch to new gmap 2026-02-04 17:00:10 +01:00
dat.c KVM: s390: vsie: Fix unshadowing logic 2026-05-22 11:25:10 +02:00
dat.h KVM: s390: vsie: Fix unshadowing logic 2026-05-22 11:25:10 +02:00
diag.c KVM: s390: Switch to new gmap 2026-02-04 17:00:10 +01:00
faultin.c KVM: s390: Add alignment checks for hugepages 2026-04-07 17:07:19 +02:00
faultin.h KVM: s390: Add helper functions for fault handling 2026-02-04 17:00:09 +01:00
gaccess.c KVM: s390: vsie: Fix unshadowing logic 2026-05-22 11:25:10 +02:00
gaccess.h KVM: s390: Switch to new gmap 2026-02-04 17:00:10 +01:00
gmap.c KVM: s390: vsie: Fix redundant rmap entries 2026-05-22 11:25:11 +02:00
gmap.h KVM: s390: Properly reset zero bit in PGSTE 2026-05-22 11:25:11 +02:00
guestdbg.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
intercept.c KVM: s390: Switch to new gmap 2026-02-04 17:00:10 +01:00
interrupt.c KVM: s390: pci: fix array indexing 2026-05-12 23:15:38 +02:00
kvm-s390.c - ESA nesting support 2026-04-13 19:01:15 +02:00
kvm-s390.h KVM: s390: vsie: Accommodate ESA prefix pages 2026-04-02 15:37:01 +02:00
pci.c KVM: s390: pci: Fix aisb calculation 2026-04-27 11:14:45 +02:00
pci.h KVM: s390: Mark __kvm_s390_init() and its descendants as __init 2022-12-29 15:41:22 -05:00
priv.c KVM: s390: Fix lpsw/e breaking event handling 2026-03-31 08:37:06 +00:00
pv.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sigp.c KVM: s390: Refactor kvm_is_error_gpa() into kvm_is_gpa_in_memslot() 2024-02-20 07:37:45 -08:00
trace-s390.h KVM: s390: Don't use %pK through tracepoints 2025-03-17 08:55:46 +00:00
trace.h
vsie.c - ESA nesting support 2026-04-13 19:01:15 +02:00