Skip to content

Commit 7d67b03

Browse files
committed
KVM: x86/mmu: Drop pointless "return" wrapper label in FNAME(fetch)
Drop the pointless and poorly named "out_gpte_changed" label, in FNAME(fetch), and instead return RET_PF_RETRY directly. No functional change intended. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
1 parent 174b6e4 commit 7d67b03

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

arch/x86/kvm/mmu/paging_tmpl.h

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -646,10 +646,10 @@ static int FNAME(fetch)(struct kvm_vcpu *vcpu, struct kvm_page_fault *fault,
646646
* really care if it changes underneath us after this point).
647647
*/
648648
if (FNAME(gpte_changed)(vcpu, gw, top_level))
649-
goto out_gpte_changed;
649+
return RET_PF_RETRY;
650650

651651
if (WARN_ON_ONCE(!VALID_PAGE(vcpu->arch.mmu->root.hpa)))
652-
goto out_gpte_changed;
652+
return RET_PF_RETRY;
653653

654654
/*
655655
* Load a new root and retry the faulting instruction in the extremely
@@ -659,7 +659,7 @@ static int FNAME(fetch)(struct kvm_vcpu *vcpu, struct kvm_page_fault *fault,
659659
*/
660660
if (unlikely(kvm_mmu_is_dummy_root(vcpu->arch.mmu->root.hpa))) {
661661
kvm_make_request(KVM_REQ_MMU_FREE_OBSOLETE_ROOTS, vcpu);
662-
goto out_gpte_changed;
662+
return RET_PF_RETRY;
663663
}
664664

665665
for_each_shadow_entry(vcpu, fault->addr, it) {
@@ -699,7 +699,7 @@ static int FNAME(fetch)(struct kvm_vcpu *vcpu, struct kvm_page_fault *fault,
699699
* protected is still there.
700700
*/
701701
if (FNAME(gpte_changed)(vcpu, gw, it.level - 1))
702-
goto out_gpte_changed;
702+
return RET_PF_RETRY;
703703

704704
if (sp != ERR_PTR(-EEXIST))
705705
link_shadow_page(vcpu, it.sptep, sp);
@@ -753,9 +753,6 @@ static int FNAME(fetch)(struct kvm_vcpu *vcpu, struct kvm_page_fault *fault,
753753

754754
FNAME(pte_prefetch)(vcpu, gw, it.sptep);
755755
return ret;
756-
757-
out_gpte_changed:
758-
return RET_PF_RETRY;
759756
}
760757

761758
/*

0 commit comments

Comments
 (0)