KVM: arm64: Use read/write spin lock for MMU protection
authorJing Zhang <jingzhangos@google.com>
Tue, 18 Jan 2022 01:57:01 +0000 (01:57 +0000)
committerMarc Zyngier <maz@kernel.org>
Tue, 8 Feb 2022 14:27:52 +0000 (14:27 +0000)
commitfcc5bf89635a05e627cdd2e9ec52c989c8dfe2ab
treefb7c7b804f73bdad74e2569af2ad32c0dd00ba78
parentdfd42facf1e4ada021b939b4e19c935dcdd55566
KVM: arm64: Use read/write spin lock for MMU protection

Replace MMU spinlock with rwlock and update all instances of the lock
being acquired with a write lock acquisition.
Future commit will add a fast path for permission relaxation during
dirty logging under a read lock.

Signed-off-by: Jing Zhang <jingzhangos@google.com>
Tested-by: Fuad Tabba <tabba@google.com>
Reviewed-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220118015703.3630552-2-jingzhangos@google.com
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/mmu.c