KVM: arm64: Make leaf->leaf PTE changes parallel-aware
authorOliver Upton <oliver.upton@linux.dev>
Mon, 7 Nov 2022 21:59:34 +0000 (21:59 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 10 Nov 2022 14:43:47 +0000 (14:43 +0000)
commit946fbfdf336b811479e024136c7cabc00157b6b9
tree17f10d2a0e9a901c9cfe096b9a5fe80b1a32367e
parent0ab12f3574db6cb432917a667f9392a88e8f0dfc
KVM: arm64: Make leaf->leaf PTE changes parallel-aware

Convert stage2_map_walker_try_leaf() to use the new break-before-make
helpers, thereby making the handler parallel-aware. As before, avoid the
break-before-make if recreating the existing mapping. Additionally,
retry execution if another vCPU thread is modifying the same PTE.

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