Skip to content

Commit beab7d0

Browse files
author
Marc Zyngier
committed
KVM: arm64: nv: Handle TLBI S1E2 for VNCR invalidation with mmu_lock held
Calling invalidate_vncr_va() without the mmu_lock held for write is a bad idea, and lockdep tells you about that. Fixes: 4ffa72a ("KVM: arm64: nv: Add S1 TLB invalidation primitive for VNCR_EL2") Signed-off-by: Marc Zyngier <maz@kernel.org>
1 parent d43548f commit beab7d0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/arm64/kvm/nested.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,6 +1044,8 @@ void kvm_handle_s1e2_tlbi(struct kvm_vcpu *vcpu, u32 inst, u64 val)
10441044
struct s1e2_tlbi_scope scope = {};
10451045

10461046
compute_s1_tlbi_range(vcpu, inst, val, &scope);
1047+
1048+
guard(write_lock)(&vcpu->kvm->mmu_lock);
10471049
invalidate_vncr_va(vcpu->kvm, &scope);
10481050
}
10491051

0 commit comments

Comments
 (0)