Re: [PATCH 4/4] KVM: x86/mmu: Factor out tdp_iter_return_to_root

From: Paolo Bonzini
Date: Fri Mar 12 2021 - 12:01:59 EST


On 12/03/21 17:35, Sean Christopherson wrote:
What about calling it tdp_iter_restart()? Or tdp_iter_resume()? Or something
like tdp_iter_restart_at_next() if we want it to give a hint that the next_last
thing is where it restarts.

I think I like tdp_iter_restart() the best. It'd be easy enough to add a
function comment clarifying from where it restarts, and IMO the resulting code
in tdp_mmu_iter_cond_resched() is the most intutive, e.g. it makes it very clear
that the walk is being restarted in some capacity after yielding.

I agree with tdp_iter_restart(), or tdp_iter_restart_from_root() too.

Paolo