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

Leonardo Bras leo.bras at arm.com
Mon Nov 9 04:37:11 PST 2026


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 at arm.com>
> 
> 


Thanks Suzuki!
Leo



More information about the linux-arm-kernel mailing list