]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: PPC: e500: Mark "struct page" pfn accessed before dropping mmu_lock
authorSean Christopherson <seanjc@google.com>
Thu, 10 Oct 2024 18:23:55 +0000 (11:23 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Feb 2025 12:49:34 +0000 (13:49 +0100)
commitd2004572fc3014cae43a0d6374ffabbbab1644d4
treef32cf0ae8c76b9c0c1cfc6f04da6ec8771ad5cb3
parent8b92e9cc04e71afb2be09f78af1de5492a0af4a4
KVM: PPC: e500: Mark "struct page" pfn accessed before dropping mmu_lock

[ Upstream commit 84cf78dcd9d65c45ab73998d4ad50f433d53fb93 ]

Mark pages accessed before dropping mmu_lock when faulting in guest memory
so that shadow_map() can convert to kvm_release_faultin_page() without
tripping its lockdep assertion on mmu_lock being held.  Marking pages
accessed outside of mmu_lock is ok (not great, but safe), but marking
pages _dirty_ outside of mmu_lock can make filesystems unhappy.

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-54-seanjc@google.com>
Stable-dep-of: 87ecfdbc699c ("KVM: e500: always restore irqs")
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/kvm/e500_mmu_host.c