]> www.infradead.org Git - nvme.git/commit
KVM: x86/mmu: Bump pf_taken stat only in the "real" page fault handler
authorSean Christopherson <seanjc@google.com>
Wed, 12 Jun 2024 19:51:38 +0000 (12:51 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 12 Jul 2024 15:17:35 +0000 (11:17 -0400)
commit5186ec223b68cc5100035d605a730819f774932f
tree0cc6d22f71bf58c8463c425e4a771a315d9128c4
parentbc1a5cd002116552db4c3541e91f8a5b1b0cf65d
KVM: x86/mmu: Bump pf_taken stat only in the "real" page fault handler

Account stat.pf_taken in kvm_mmu_page_fault(), i.e. the actual page fault
handler, instead of conditionally bumping it in kvm_mmu_do_page_fault().
The "real" page fault handler is the only path that should ever increment
the number of taken page faults, as all other paths that "do page fault"
are by definition not handling faults that occurred in the guest.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/mmu/mmu_internal.h