On Tue, Oct 22, 2024, Juergen Gross wrote:
Testing whether to call kvm_tdp_page_fault() or
vcpu->arch.mmu->page_fault() doesn't make sense, as kvm_tdp_page_fault()
is selected only if vcpu->arch.mmu->page_fault == kvm_tdp_page_fault.
It does when retpolines are enabled and significantly inflate the cost of the
indirect call. This is a hot path in various scenarios, but KVM can't use
static_call() to avoid the retpoline due to mmu->page_fault being a property of
the current vCPU. Only kvm_tdp_page_fault() is special cased because all other
mmu->page_fault targets are slow-ish and/or we don't care terribly about their
performance.
Attachment:
OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key
Attachment:
OpenPGP_signature.asc
Description: OpenPGP digital signature