]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: PPC: Book3S: Mark "struct page" pfns dirty/accessed after installing PTE
authorSean Christopherson <seanjc@google.com>
Thu, 10 Oct 2024 18:24:05 +0000 (11:24 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 25 Oct 2024 17:00:49 +0000 (13:00 -0400)
commit2b26d6b7a8ba047bec3f6f2b46ca7b33373c50cb
tree41335d61fcf78cc0917fa740bf92db46b586ca5a
parentdac09f61e7325158a797fe56981764a8dc297e89
KVM: PPC: Book3S: Mark "struct page" pfns dirty/accessed after installing PTE

Mark pages/folios dirty/accessed after installing a PTE, and more
specifically after acquiring mmu_lock and checking for an mmu_notifier
invalidation.  Marking a page/folio dirty after it has been written back
can make some filesystems unhappy (backing KVM guests will such filesystem
files is uncommon, and the race is minuscule, hence the lack of complaints).
See the link below for details.

This will also allow converting Book3S to kvm_release_faultin_page(),
which requires that mmu_lock be held (for the aforementioned reason).

Link: https://lore.kernel.org/all/cover.1683044162.git.lstoakes@gmail.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-ID: <20241010182427.1434605-64-seanjc@google.com>
arch/powerpc/kvm/book3s_64_mmu_host.c