Skip to content

Commit cae083c

Browse files
committed
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.
2 parents 7a9164d + 2d5faa6 commit cae083c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/x86/kvm/mmu/mmu_internal.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,10 @@ static inline int kvm_mmu_do_page_fault(struct kvm_vcpu *vcpu, gpa_t cr2_or_gpa,
321321
fault.slot = kvm_vcpu_gfn_to_memslot(vcpu, fault.gfn);
322322
}
323323

324+
/*
325+
* With retpoline being active an indirect call is rather expensive,
326+
* so do a direct call in the most common case.
327+
*/
324328
if (IS_ENABLED(CONFIG_MITIGATION_RETPOLINE) && fault.is_tdp)
325329
r = kvm_tdp_page_fault(vcpu, &fault);
326330
else

0 commit comments

Comments
 (0)