summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-01-20 14:36:55 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2025-01-20 14:36:55 +0300
commitcae083c4e7ce2123fa173d3551b3f6468d6d6f9c (patch)
treebd2e528230293d598ecf89f2dae6c886e78a39d0
parent7a9164dc69fd56d0f5c4af6fce6552837b2b0bad (diff)
parent2d5faa6a8402435d6332e8e8f3c3f18cca382d83 (diff)
downloadlinux-cae083c4e7ce2123fa173d3551b3f6468d6d6f9c.tar.xz
Merge tag 'kvm-x86-mmu-6.14' of https://github.com/kvm-x86/linux into HEAD
KVM x86 MMU changes for 6.14: - Add a comment to kvm_mmu_do_page_fault() to explain why KVM performs a direct call to kvm_tdp_page_fault() when RETPOLINE is enabled.
-rw-r--r--arch/x86/kvm/mmu/mmu_internal.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kvm/mmu/mmu_internal.h b/arch/x86/kvm/mmu/mmu_internal.h
index b00abbe3f6cf..72de71f4bc8b 100644
--- a/arch/x86/kvm/mmu/mmu_internal.h
+++ b/arch/x86/kvm/mmu/mmu_internal.h
@@ -321,6 +321,10 @@ static inline int kvm_mmu_do_page_fault(struct kvm_vcpu *vcpu, gpa_t cr2_or_gpa,
fault.slot = kvm_vcpu_gfn_to_memslot(vcpu, fault.gfn);
}
+ /*
+ * With retpoline being active an indirect call is rather expensive,
+ * so do a direct call in the most common case.
+ */
if (IS_ENABLED(CONFIG_MITIGATION_RETPOLINE) && fault.is_tdp)
r = kvm_tdp_page_fault(vcpu, &fault);
else