Re: [PATCH RESEND v4 1/3] KVM: arm64: Avoid re-testing walk_continue

From: Leonardo Bras

Date: Mon Nov 09 2026 - 07:37:36 EST


On Fri, Nov 06, 2026 at 04:59:05PM +0000, Suzuki K Poulose wrote:
> On 06/11/2026 16:12, Leonardo Bras wrote:
> > __kvm_pgtable_visit() performs a bunch of calls to
> > kvm_pgtable_walk_continue() to find out whether the walk can continue
> > further, and if not, 'goto out', which retests the possibility of
> > continuing the walk before exiting.
> >
> > Given that it's testing the same ret variable again, there is no reason
> > the result of kvm_pgtable_walk_continue() would have changed since the
> > previous check. So turn this goto into an early return, simplifying the
> > code and paving the way for further rework."
>
> Looks sensible to me.
>
> Reviewed-by: Suzuki K Poulose <suzuki.poulose@xxxxxxx>
>
>


Thanks Suzuki!
Leo