KVM: arm64: Make table->block changes parallel-aware
authorOliver Upton <oliver.upton@linux.dev>
Mon, 7 Nov 2022 22:00:06 +0000 (22:00 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 10 Nov 2022 14:43:47 +0000 (14:43 +0000)
commitaf87fc03cfdf6893011df419588d27acdfb9c197
treec8e8b3a3917c6566f07242366f42c718935aec87
parent946fbfdf336b811479e024136c7cabc00157b6b9
KVM: arm64: Make table->block changes parallel-aware

stage2_map_walker_try_leaf() and friends now handle stage-2 PTEs
generically, and perform the correct flush when a table PTE is removed.
Additionally, they've been made parallel-aware, using an atomic break
to take ownership of the PTE.

Stop clearing the PTE in the pre-order callback and instead let
stage2_map_walker_try_leaf() deal with it.

Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20221107220006.1895572-1-oliver.upton@linux.dev
arch/arm64/kvm/hyp/pgtable.c