summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kvm/hyp/nvhe/mem_protect.c
diff options
context:
space:
mode:
authorOliver Upton <oliver.upton@linux.dev>2022-11-07 22:00:33 +0000
committerMarc Zyngier <maz@kernel.org>2022-11-10 14:43:47 +0000
commit1577cb5823cefdff4416f272a88143ee933d97f5 (patch)
tree632abd3cbc68471a272dba04a3d6c391f916b3d8 /arch/arm64/kvm/hyp/nvhe/mem_protect.c
parentaf87fc03cfdf6893011df419588d27acdfb9c197 (diff)
downloadlinux-stable-1577cb5823cefdff4416f272a88143ee933d97f5.tar.gz
linux-stable-1577cb5823cefdff4416f272a88143ee933d97f5.tar.bz2
linux-stable-1577cb5823cefdff4416f272a88143ee933d97f5.zip
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
Diffstat (limited to 'arch/arm64/kvm/hyp/nvhe/mem_protect.c')
-rw-r--r--arch/arm64/kvm/hyp/nvhe/mem_protect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kvm/hyp/nvhe/mem_protect.c b/arch/arm64/kvm/hyp/nvhe/mem_protect.c
index 735769886b55..f6d82bf33ce1 100644
--- a/arch/arm64/kvm/hyp/nvhe/mem_protect.c
+++ b/arch/arm64/kvm/hyp/nvhe/mem_protect.c
@@ -257,7 +257,7 @@ static inline int __host_stage2_idmap(u64 start, u64 end,
enum kvm_pgtable_prot prot)
{
return kvm_pgtable_stage2_map(&host_kvm.pgt, start, end - start, start,
- prot, &host_s2_pool);
+ prot, &host_s2_pool, 0);
}
/*