]> git.itanic.dy.fi Git - linux-stable/commit
KVM: arm64: Handle stage-2 faults in parallel
authorOliver Upton <oliver.upton@linux.dev>
Mon, 7 Nov 2022 22:00:33 +0000 (22:00 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 10 Nov 2022 14:43:47 +0000 (14:43 +0000)
commit1577cb5823cefdff4416f272a88143ee933d97f5
tree632abd3cbc68471a272dba04a3d6c391f916b3d8
parentaf87fc03cfdf6893011df419588d27acdfb9c197
KVM: arm64: Handle stage-2 faults in parallel

The stage-2 map walker has been made parallel-aware, and as such can be
called while only holding the read side of the MMU lock. Rip out the
conditional locking in user_mem_abort() and instead grab the read lock.
Continue to take the write lock from other callsites to
kvm_pgtable_stage2_map().

Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20221107220033.1895655-1-oliver.upton@linux.dev
arch/arm64/include/asm/kvm_pgtable.h
arch/arm64/kvm/hyp/nvhe/mem_protect.c
arch/arm64/kvm/hyp/pgtable.c
arch/arm64/kvm/mmu.c