On Tue, 22 Sept 2026 at 15:19, Lorenzo Stoakes (ARM) <[email protected]> wrote:
>
> From: Jack Thomson <[email protected]>
>
> Allow callers of kvm_pgtable_get_leaf() to specify the page-table walk
> flags, in preparation for performing walks under the MMU read lock.
>
> Reading a stage-2 leaf while only holding the read lock requires
> KVM_PGTABLE_WALK_SHARED: parallel faults (which also only hold the read
> lock) can unlink table pages and free them via RCU, so the walker must
> be inside an RCU read-side critical section, which the shared walk flag
> provides via kvm_pgtable_walk_begin().
>
> All existing callers either hold the write lock, walk with interrupts
> disabled, or run at hyp where shared walks are rejected; they keep the
> current behaviour by passing no flags.
>
> No functional change intended.
>
> Signed-off-by: Jack Thomson <[email protected]>
> [ljs: fixup new kvm_pgtable_get_leaf() invocation]
> Signed-off-by: Lorenzo Stoakes (ARM) <[email protected]>

Reviewed-by: Fuad Tabba <[email protected]>

Cheers,
/fuad

Reply via email to