]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: s390: Correctly handle guest mappings without struct page
authorClaudio Imbrenda <imbrenda@linux.ibm.com>
Thu, 26 Mar 2026 13:17:14 +0000 (14:17 +0100)
committerClaudio Imbrenda <imbrenda@linux.ibm.com>
Thu, 26 Mar 2026 15:12:18 +0000 (16:12 +0100)
commit0f2b760a17126cb7940d410c99edfa14e928554c
tree50aa73ca9ed2345e14e27babaf66d06fb020b9f4
parent45921d0212d4a335680854c89a14efd01eae911a
KVM: s390: Correctly handle guest mappings without struct page

Introduce a new special softbit for large pages, like already presend
for normal pages, and use it to mark guest mappings that do not have
struct pages.

Whenever a leaf DAT entry becomes dirty, check the special softbit and
only call SetPageDirty() if there is an actual struct page.

Move the logic to mark pages dirty inside _gmap_ptep_xchg() and
_gmap_crstep_xchg_atomic(), to avoid needlessly duplicating the code.

Fixes: 5a74e3d93417 ("KVM: s390: KVM-specific bitfields and helper functions")
Fixes: a2c17f9270cc ("KVM: s390: New gmap code")
Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
arch/s390/kvm/dat.h
arch/s390/kvm/gmap.c
arch/s390/kvm/gmap.h