]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: x86/mmu: Mark pages/folios dirty at the origin of make_spte()
authorSean Christopherson <seanjc@google.com>
Thu, 10 Oct 2024 18:23:43 +0000 (11:23 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 25 Oct 2024 16:59:08 +0000 (12:59 -0400)
commit0cad68cab1135b60348a7b81814c8d2ff4b959ea
tree160a9fff30785aa7885553e6fdf96e243006008c
parent7103853952957cad58f957142c72bf7a4644b7a9
KVM: x86/mmu: Mark pages/folios dirty at the origin of make_spte()

Move the marking of folios dirty from make_spte() out to its callers,
which have access to the _struct page_, not just the underlying pfn.
Once all architectures follow suit, this will allow removing KVM's ugly
hack where KVM elevates the refcount of VM_MIXEDMAP pfns that happen to
be struct page memory.

Tested-by: Alex Bennée <alex.bennee@linaro.org>
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-42-seanjc@google.com>
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/mmu/paging_tmpl.h
arch/x86/kvm/mmu/spte.c