Skip to content

Commit 430e264

Browse files
dmatlacksean-jc
authored andcommitted
KVM: x86/mmu: Rename make_huge_page_split_spte() to make_small_spte()
Rename make_huge_page_split_spte() to make_small_spte(). This ensures that the usage of "small_spte" and "huge_spte" are consistent between make_huge_spte() and make_small_spte(). This should also reduce some confusion as make_huge_page_split_spte() almost reads like it will create a huge SPTE, when in fact it is creating a small SPTE to split the huge SPTE. No functional change intended. Suggested-by: Sean Christopherson <[email protected]> Signed-off-by: David Matlack <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
1 parent 13e2e4f commit 430e264

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

arch/x86/kvm/mmu/mmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6735,7 +6735,7 @@ static void shadow_mmu_split_huge_page(struct kvm *kvm,
67356735
continue;
67366736
}
67376737

6738-
spte = make_huge_page_split_spte(kvm, huge_spte, sp->role, index);
6738+
spte = make_small_spte(kvm, huge_spte, sp->role, index);
67396739
mmu_spte_set(sptep, spte);
67406740
__rmap_add(kvm, cache, slot, sptep, gfn, sp->role.access);
67416741
}

arch/x86/kvm/mmu/spte.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,8 @@ static u64 make_spte_nonexecutable(u64 spte)
295295
* This is used during huge page splitting to build the SPTEs that make up the
296296
* new page table.
297297
*/
298-
u64 make_huge_page_split_spte(struct kvm *kvm, u64 huge_spte,
299-
union kvm_mmu_page_role role, int index)
298+
u64 make_small_spte(struct kvm *kvm, u64 huge_spte,
299+
union kvm_mmu_page_role role, int index)
300300
{
301301
u64 child_spte = huge_spte;
302302

arch/x86/kvm/mmu/spte.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,8 +504,8 @@ bool make_spte(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp,
504504
unsigned int pte_access, gfn_t gfn, kvm_pfn_t pfn,
505505
u64 old_spte, bool prefetch, bool synchronizing,
506506
bool host_writable, u64 *new_spte);
507-
u64 make_huge_page_split_spte(struct kvm *kvm, u64 huge_spte,
508-
union kvm_mmu_page_role role, int index);
507+
u64 make_small_spte(struct kvm *kvm, u64 huge_spte,
508+
union kvm_mmu_page_role role, int index);
509509
u64 make_huge_spte(struct kvm *kvm, u64 small_spte, int level);
510510
u64 make_nonleaf_spte(u64 *child_pt, bool ad_disabled);
511511
u64 make_mmio_spte(struct kvm_vcpu *vcpu, u64 gfn, unsigned int access);

arch/x86/kvm/mmu/tdp_mmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1314,7 +1314,7 @@ static int tdp_mmu_split_huge_page(struct kvm *kvm, struct tdp_iter *iter,
13141314
* not been linked in yet and thus is not reachable from any other CPU.
13151315
*/
13161316
for (i = 0; i < SPTE_ENT_PER_PAGE; i++)
1317-
sp->spt[i] = make_huge_page_split_spte(kvm, huge_spte, sp->role, i);
1317+
sp->spt[i] = make_small_spte(kvm, huge_spte, sp->role, i);
13181318

13191319
/*
13201320
* Replace the huge spte with a pointer to the populated lower level

0 commit comments

Comments
 (0)