]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: LoongArch: Mark "struct page" pfns dirty only in "slow" page fault path
authorSean Christopherson <seanjc@google.com>
Thu, 10 Oct 2024 18:24:07 +0000 (11:24 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 25 Oct 2024 17:00:49 +0000 (13:00 -0400)
commit0fe133a33e4ce333e6f8795e3ec50d94a17c9c16
tree09b450065c8d4aaaebdad695a7a009576a7315b6
parent8b135c77994d06d430c6c29eebdab42411993d9c
KVM: LoongArch: Mark "struct page" pfns dirty only in "slow" page fault path

Mark pages/folios dirty only the slow page fault path, i.e. only when
mmu_lock is held and the operation is mmu_notifier-protected, as 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.

Link: https://lore.kernel.org/all/cover.1683044162.git.lstoakes@gmail.com
Reviewed-by: Bibo Mao <maobibo@loongson.cn>
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-66-seanjc@google.com>
arch/loongarch/kvm/mmu.c