Skip to content

Commit 9fe17d2

Browse files
sean-jcbonzini
authored andcommitted
KVM: x86/mmu: Clean up make_huge_page_split_spte() definition and intro
Tweak the definition of make_huge_page_split_spte() to eliminate an unnecessarily long line, and opportunistically initialize child_spte to make it more obvious that the child is directly derived from the huge parent. No functional change intended. Signed-off-by: Sean Christopherson <seanjc@google.com> Message-ID: <20240712151335.1242633-3-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 3d4415e commit 9fe17d2

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

arch/x86/kvm/mmu/spte.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -291,15 +291,13 @@ static u64 make_spte_executable(u64 spte)
291291
* This is used during huge page splitting to build the SPTEs that make up the
292292
* new page table.
293293
*/
294-
u64 make_huge_page_split_spte(struct kvm *kvm, u64 huge_spte, union kvm_mmu_page_role role,
295-
int index)
294+
u64 make_huge_page_split_spte(struct kvm *kvm, u64 huge_spte,
295+
union kvm_mmu_page_role role, int index)
296296
{
297-
u64 child_spte;
297+
u64 child_spte = huge_spte;
298298

299299
KVM_BUG_ON(!is_shadow_present_pte(huge_spte) || !is_large_pte(huge_spte), kvm);
300300

301-
child_spte = huge_spte;
302-
303301
/*
304302
* The child_spte already has the base address of the huge page being
305303
* split. So we just have to OR in the offset to the page at the next

0 commit comments

Comments
 (0)