KVM: x86/mmu: Use kvm_x86_call() instead of manual static_call()
Sean Christopherson
maintainerPATCH 1/1 KVM: x86/mmu: Use kvm_x86_call() instead of manual static_call()
Use KVM's preferred kvm_x86_call() wrapper to invoke static calls related to mirror page tables.
No functional change intended.
Fixes 77ac7079e66d ("KVM: x86/tdp_mmu: Propagate building mirror page tables")
Fixes 94faba8999b9 ("KVM: x86/tdp_mmu: Propagate tearing down mirror page tables")
Signed-off-by Sean Christopherson <[email protected]>
--- arch/x86/kvm/mmu/tdp_mmu.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
arch/x86/kvm/mmu/tdp_mmu.c +5 -5
@@ -372,7 +372,7 @@ static void remove_external_spte(struct kvm *kvm, gfn_t gfn, u64 old_spte,/* Zapping leaf spte is allowed only when write lock is held. */ lockdep_assert_held_write (&kvm->mmu_lock);/* Because write lock is held, operation should success. */ - ret =static_call (kvm_x86_remove_external_spte)(kvm, gfn, level, old_pfn); + ret =kvm_x86_call (remove_external_spte)(kvm, gfn, level, old_pfn);KVM_BUG_ON (ret, kvm); }
@@ -479,8 +479,8 @@ static void handle_removed_pt(struct kvm *kvm, tdp_ptep_t pt, bool shared) }if (is_mirror_sp (sp) && -WARN_ON (static_call (kvm_x86_free_external_spt)(kvm, base_gfn, sp->role.level, - sp->external_spt))) { +WARN_ON (kvm_x86_call (free_external_spt)(kvm, base_gfn, sp->role.level, + sp->external_spt))) {/* * Failed to free page table page in mirror page table and * there is nothing to do further.
@@ -532,12 +532,12 @@ static int __must_check set_external_spte_present(struct kvm *kvm, tdp_ptep_t sp* external page table, or leaf. */ if (is_leaf) { - ret =static_call (kvm_x86_set_external_spte)(kvm, gfn, level, new_pfn); + ret =kvm_x86_call (set_external_spte)(kvm, gfn, level, new_pfn); }else {void *external_spt =get_external_spt (gfn, new_spte, level);KVM_BUG_ON (!external_spt, kvm); - ret =static_call (kvm_x86_link_external_spt)(kvm, gfn, level, external_spt); + ret =kvm_x86_call (link_external_spt)(kvm, gfn, level, external_spt); }if (ret)__kvm_tdp_mmu_write_spte (sptep, old_spte);
base-commit: 782f9feaa9517caf33186dcdd6b50a8f770ed29b
Signature · 1 line
2.49.0.472.ge94155a9ec-goog
Quoted 8 lines · Sean Christopherson
Use KVM's preferred
kvm_x86_call()wrapper to invoke static calls related to mirror page tables.No functional change intended.
Fixes 77ac7079e66d ("KVM: x86/tdp_mmu: Propagate building mirror page tables")Fixes 94faba8999b9 ("KVM: x86/tdp_mmu: Propagate tearing down mirror page tables")Signed-off-by Sean Christopherson <[email protected]>
Reviewed-by Kai Huang <[email protected]>
Quoted 4 lines · Sean Christopherson
Use KVM's preferred
kvm_x86_call()wrapper to invoke static calls related to mirror page tables.No functional change intended.
Applied to kvm-x86 mmu.
[1/1] KVM: x86/mmu: Use kvm_x86_call() instead of manual static_call()
https://github.com/kvm-x86/linux/commit/6a3d704959bd