aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kvm/svm/nested.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2022-11-17 11:05:51 -0500
committerPaolo Bonzini <pbonzini@redhat.com>2022-11-17 11:10:25 -0500
commit63d28a25e04cb48e6bd15141506645ac99d9f8b2 (patch)
tree2a28b0d226d56e9c300c11f94d9d7e56f3ee1f6b /arch/x86/kvm/svm/nested.c
parentc4b33d28ea51c7d194b19a41c96a4f973cc0a280 (diff)
downloadlinux-63d28a25e04cb48e6bd15141506645ac99d9f8b2.tar.gz
linux-63d28a25e04cb48e6bd15141506645ac99d9f8b2.tar.bz2
linux-63d28a25e04cb48e6bd15141506645ac99d9f8b2.zip
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>
Diffstat (limited to 'arch/x86/kvm/svm/nested.c')
0 files changed, 0 insertions, 0 deletions