]> www.infradead.org Git - users/dwmw2/linux.git/commit
KVM: e500: use shadow TLB entry as witness for writability
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 Jan 2025 15:19:28 +0000 (16:19 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Sun, 12 Jan 2025 09:35:36 +0000 (10:35 +0100)
commite97fbb43fb1b2e909dfd726204af3cdcb971517e
tree5f31d0f93d77206af60245d98419a2c9436a22df
parent87ecfdbc699cc95fac73291b52650283ddcf929d
KVM: e500: use shadow TLB entry as witness for writability

kvmppc_e500_ref_setup is returning whether the guest TLB entry is writable,
which is than passed to kvm_release_faultin_page.  This makes little sense
for two reasons: first, because the function sets up the private data for
the page and the return value feels like it has been bolted on the side;
second, because what really matters is whether the _shadow_ TLB entry is
writable.  If it is not writable, the page can be released as non-dirty.
Shift from using tlbe_is_writable(gtlbe) to doing the same check on
the shadow TLB entry.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/powerpc/kvm/e500_mmu_host.c