]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
KVM: s390: Do not set special large pages dirty
authorClaudio Imbrenda <imbrenda@linux.ibm.com>
Tue, 23 Jun 2026 15:33:24 +0000 (17:33 +0200)
committerClaudio Imbrenda <imbrenda@linux.ibm.com>
Wed, 24 Jun 2026 08:08:56 +0000 (10:08 +0200)
Special pages / folios should not be set dirty. This also applies to
large pages.

Add a missing check in gmap_clear_young_crste() to prevent setting the
large page dirty if it is a special page.

Fixes: a2c17f9270cc ("KVM: s390: New gmap code")
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Message-ID: <20260623153331.233784-4-imbrenda@linux.ibm.com>

arch/s390/kvm/gmap.c

index 52d55ddea8d4fcb427b75b3d3aa7b5e4f2fefce9..3192f610f696276f96f1dc544338994e1fdcbe1b 100644 (file)
@@ -327,7 +327,7 @@ static long gmap_clear_young_crste(union crste *crstep, gfn_t gfn, gfn_t end, st
                new.h.i = 1;
                new.s.fc1.y = 0;
                new.s.fc1.prefix_notif = 0;
-               if (new.s.fc1.d || !new.h.p)
+               if ((new.s.fc1.d || !new.h.p) && !new.s.fc1.s)
                        folio_set_dirty(phys_to_folio(crste_origin_large(crste)));
                new.s.fc1.d = 0;
                new.h.p = 1;