linux/arch/x86/kvm/mmu
Paolo Bonzini 63d28a25e0 KVM: x86/mmu: simplify kvm_tdp_mmu_map flow when guest has to retry
A removed SPTE is never present, hence the "if" in kvm_tdp_mmu_map
only fails in the exact same conditions that the earlier loop
tested in order to issue a  "break". So, instead of checking twice the
condition (upper level SPTEs could not be created or was frozen), just
exit the loop with a goto---the usual poor-man C replacement for RAII
early returns.

While at it, do not use the "ret" variable for return values of
functions that do not return a RET_PF_* enum.  This is clearer
and also makes it possible to initialize ret to RET_PF_RETRY.

Suggested-by: Robert Hoo <robert.hu@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-11-17 11:10:25 -05:00
..
mmu_internal.h KVM: x86/mmu: Add helper to convert SPTE value to its shadow page 2022-11-09 12:31:33 -05:00
mmu.c KVM: x86/mmu: WARN if TDP MMU SP disallows hugepage after being zapped 2022-11-09 12:31:34 -05:00
mmutrace.h KVM: x86/mmu: Add RET_PF_CONTINUE to eliminate bool+int* "returns" 2022-05-12 09:51:42 -04:00
page_track.c KVM: use __vcalloc for very large allocations 2022-03-08 09:30:57 -05:00
paging_tmpl.h KVM: x86/mmu: Rename NX huge pages fields/functions for consistency 2022-11-09 12:31:31 -05:00
spte.c KVM: x86/mmu: Properly account NX huge page workaround for nonpaging MMUs 2022-11-09 12:31:32 -05:00
spte.h KVM: x86/mmu: Add helper to convert SPTE value to its shadow page 2022-11-09 12:31:33 -05:00
tdp_iter.c KVM: x86/mmu: Don't bottom out on leafs when zapping collapsible SPTEs 2022-07-28 13:22:24 -04:00
tdp_iter.h KVM: x86/mmu: Don't bottom out on leafs when zapping collapsible SPTEs 2022-07-28 13:22:24 -04:00
tdp_mmu.c KVM: x86/mmu: simplify kvm_tdp_mmu_map flow when guest has to retry 2022-11-17 11:10:25 -05:00
tdp_mmu.h KVM: x86/mmu: Add helper to convert SPTE value to its shadow page 2022-11-09 12:31:33 -05:00