Thread (40 messages) 40 messages, 4 authors, 14d ago

Re: [PATCH v3 09/14] KVM: arm64: Pass walk flags to kvm_pgtable_get_leaf()

flat view

From: Fuad Tabba <fuad.tabba@linux.dev>
Date: 2026-09-23 11:08:15
Also in: kvm, kvmarm, linux-doc, linux-kselftest, lkml

On Tue, 22 Sept 2026 at 15:19, Lorenzo Stoakes (ARM) [off-list ref] wrote:
From: Jack Thomson <redacted>

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 <redacted>
[ljs: fixup new kvm_pgtable_get_leaf() invocation]
Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
Reviewed-by: Fuad Tabba <fuad.tabba@linux.dev>

Cheers,
/fuad
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help