]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Pass the memslot around via struct kvm_page_fault
authorDavid Matlack <dmatlack@google.com>
Fri, 24 Sep 2021 09:05:26 +0000 (05:05 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 1 Oct 2021 07:44:53 +0000 (03:44 -0400)
commit12a4be8af96ce7adb26e064b0c42961c47642ec7
tree73f624c5ff275ba2a777cf7f7723e93d292d933a
parent5194ca5e469d8048aa66b233a75d7c026de854a4
KVM: x86/mmu: Pass the memslot around via struct kvm_page_fault

The memslot for the faulting gfn is used throughout the page fault
handling code, so capture it in kvm_page_fault as soon as we know the
gfn and use it in the page fault handling code that has direct access
to the kvm_page_fault struct.  Replace various tests using is_noslot_pfn
with more direct tests on fault->slot being NULL.

This, in combination with the subsequent patch, improves "Populate
memory time" in dirty_log_perf_test by 5% when using the legacy MMU.
There is no discerable improvement to the performance of the TDP MMU.

No functional change intended.

Suggested-by: Ben Gardon <bgardon@google.com>
Signed-off-by: David Matlack <dmatlack@google.com>
Message-Id: <20210813203504.2742757-4-dmatlack@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu.h
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/mmu/paging_tmpl.h
arch/x86/kvm/mmu/tdp_mmu.c