KVM: x86/mmu: Rename handle_removed_tdp_mmu_page() to handle_removed_pt()
First remove tdp_mmu_ from the name since it is redundant given that it is a static function in tdp_mmu.c. There is a pattern of using tdp_mmu_ as a prefix in the names of static TDP MMU functions, but all of the other handle_*() variants do not include such a prefix. So drop it entirely. Then change "page" to "pt" to convey that this is operating on a page table rather than an struct page. Purposely use "pt" instead of "sp" since this function takes the raw RCU-protected page table pointer as an argument rather than a pointer to the struct kvm_mmu_page. No functional change intended. Signed-off-by: David Matlack <dmatlack@google.com> Message-Id: <20220119230739.2234394-7-dmatlack@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
c298a30c28
commit
0f53dfa34e
|
|
@ -312,7 +312,7 @@ static void tdp_mmu_unlink_sp(struct kvm *kvm, struct kvm_mmu_page *sp,
|
|||
}
|
||||
|
||||
/**
|
||||
* handle_removed_tdp_mmu_page - handle a pt removed from the TDP structure
|
||||
* handle_removed_pt() - handle a page table removed from the TDP structure
|
||||
*
|
||||
* @kvm: kvm instance
|
||||
* @pt: the page removed from the paging structure
|
||||
|
|
@ -328,8 +328,7 @@ static void tdp_mmu_unlink_sp(struct kvm *kvm, struct kvm_mmu_page *sp,
|
|||
* this thread will be responsible for ensuring the page is freed. Hence the
|
||||
* early rcu_dereferences in the function.
|
||||
*/
|
||||
static void handle_removed_tdp_mmu_page(struct kvm *kvm, tdp_ptep_t pt,
|
||||
bool shared)
|
||||
static void handle_removed_pt(struct kvm *kvm, tdp_ptep_t pt, bool shared)
|
||||
{
|
||||
struct kvm_mmu_page *sp = sptep_to_sp(rcu_dereference(pt));
|
||||
int level = sp->role.level;
|
||||
|
|
@ -492,8 +491,7 @@ static void __handle_changed_spte(struct kvm *kvm, int as_id, gfn_t gfn,
|
|||
* the paging structure.
|
||||
*/
|
||||
if (was_present && !was_leaf && (pfn_changed || !is_present))
|
||||
handle_removed_tdp_mmu_page(kvm,
|
||||
spte_to_child_pt(old_spte, level), shared);
|
||||
handle_removed_pt(kvm, spte_to_child_pt(old_spte, level), shared);
|
||||
}
|
||||
|
||||
static void handle_changed_spte(struct kvm *kvm, int as_id, gfn_t gfn,
|
||||
|
|
|
|||
Loading…
Reference in New Issue